cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How can i Automate a Consecutive order

Good day, I require your support:

I have an application with multiple accesses to sharepoint lists. Which is used by various administrative areas. Every day we make orders, which have a numerical order.

There is some way that when a partner goes to create a new order, the consecutive order is automatically selected.

Currently we do it in an excel shared by Teams and it is easy to see this.

However, the director requires reports of this information in BI and from Excel, there are problems with the standardization of the data. 

 

This first column is what i want to show or do automateThis first column is what i want to show or do automate

 

 

14 REPLIES 14

@Anonymous ,

What is the one reference - it has no operator after it

Anonymous
Not applicable

@WarrenBelz  hi, okok.

I started the formula from Filter and it gives me delegation warning.
Filter (Pedidos;Fecha=Today ();) or Filter (Pedidos;Fecha=Today ()). with both, have the same mistake.

 

when I add the Sort thing I get the following error:

17.png

 

When i add the complete formula i get the following error:
18.png

 

This formula i put in Default of the tarjet, am I doing it right?

 

My formula is: 

If(
    Form1.Mode = FormMode.New;
        If(
            vExist
                First(
            Sort(
            Filter(
               Pedidos;
               Fecha = Today();
            );
            PedidoDiario;
            Descending
            )
            ).PedidoDiario+1;
            1
            );
Parent.Default
)

 

Thanks @Anonymous ,

I will correct a couple of things and see how this goes.
Note however that date queries are not delegable, so the biggest dataset this will work on is 2000 records.

If(
   Form1.Mode = FormMode.New;
   If(
      vExist;            //; added here
      First(
         Sort(
            Filter(
               Pedidos;
               IsToday(Fecha)   //; removed here and formula changed
            );
            PedidoDiario;
            Descending
         )
      ).PedidoDiario+1;
      1
   );
   Parent.Default
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Anonymous
Not applicable

@WarrenBelz  Something I'm doing wrong and I'm not sure what.

 

First, the set places it on the screen where the order will be edited. In the OnVisible section.
It's wrong:"The requested operation is not valid: The expression "Date eq 2020-06-04" is not valid. "

20.png

 

Second, the formula is located on the card that will carry the count in the Default section.
I get an If error that has invalid arguments. and, that the name is not valid and the identifier is not recognized.

21.png

 

PS: I have 1886 columns.

@Anonymous ,

Firstly, I assume Fetcha is a Date Field? Note you have not used the change I made IsToday(Fetcha).

Second one - there is nothing wrong with the syntax - you need to check the values

If(
   Form1.Mode = FormMode.New; 
   If(
      vExist; 
      First(
         Sort(
            Filter(
               Pedidos_1; 
               IsToday(Fecha)
            );
            PedidoDiario; 
            Descending
         )
      ).PedidoDiario+1;
      1
   );
   Parent.Default
)

Do some debugging on a label - see if you get a number value with this

First(
   Sort(
      Filter(
         Pedidos_1; 
         IsToday(Fecha)
      );
      PedidoDiario; 
      Descending
   )
).PedidoDiario

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (34,740)