cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

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
Highlighted

@Mike_Gzz ,

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

Highlighted

@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
)

 

Highlighted

Thanks @Mike_Gzz ,

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.

Highlighted

@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.

Highlighted

@Mike_Gzz ,

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (10,476)