cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
irsimeonov
Level: Powered On

Max() is not delegatable function however I am not getting a blue dot warning when I use it, why?

Hi guys

 

I am using a SharePoint list where I create a unique ID for each item using Max(). Using this approach on one of the SharePoint lists, I do not get a blue dot warning while when I use Max() on a different SharePoint list I do get the warning, do you know why?

 

Here is the formula I use where I DO NOT get a blue dot warning:

 

Text(
         Max(
                  Filter(SharePointList1,
                             TextColumn1 = DropDown1.Selected.Value,
                             TextColumn2 = DropDown2.Selected.Value

                   ),
                  TextColumn3

          ) +1,
         "[$-en-GB]000")

)

 

Here is the formula I use where I GET a blue dot warning (note that the only difference is that the column that is filtered by is calculated column in SharePoint rather than just a text column):

 

Text(
         Max(
                  Filter(SharePointList2,
                             CalculatedColumn1 = TextBox1.Value,
                   ),
                  TextColumn2

          ) +1,
         "[$-en-GB]000")

)

 

Shouldn't I be getting blue dot warning on both of the above formulae?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Max() is not delegatable function however I am not getting a blue dot warning when I use it, why

This is a really old thread, but the way I got around this is to use a completely separate SharePoint List Called IDNums with one item in it - two columns, one number column called NextRefID and one text column Title, and then have it do:

UpdateIf(IDNums, Title = "NextNum", {NextRefID: NextRefID + 1});

..whenever you navigate to a screen that creates a new entry - that way anyone who presses the 'new' button, even if they dont submit it, will always get a unique ID number.




Don't forget to 'Mark as Solution' if a post answered your question and always 'Thumbs Up' the posts you like or helped you!

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: Max() is not delegatable function however I am not getting a blue dot warning when I use it, why

Hi @irsimeonov,

 

Could you please share information about the blue reminding for your second formula?

Actually I think the first formula you used here should be delegatable with the datasource, as the MAX function didn't execute at the data source side.

You should be reminded with error messages if you use the Max Function within the Fitler funciton.

The query that works directly at the data source is within fitler function, where you referenced the data source, and within Filter function, all the used funcitons or operators is delegatable.

Understand delegation

Besides, the blue reminding for your second formula should be related with the column type not supported.

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
irsimeonov
Level: Powered On

Re: Max() is not delegatable function however I am not getting a blue dot warning when I use it, why

Hi Michael

 

The blue dot warning at the second formula is exactly under the calculated column, so you are right, I suppose SharePoint calculated columns are not supported.

 

I think I probably didn't understand delegation very well. Let me try to clear it in my head, If the result of the Filter() in the first formula is say 10,000 rows, are you saying that the Max() function will be performed correctly over all of the 10,000 rows (I thought for some reason PowerApps can only work with up to 500 rows when using the Max())? If that is the case, then all of the non-delgatable functions such as Max, Sum, Count, etc. could easily be resolved by just putting a simple Filter() within their arguments without any filter conditions e.g. Filter( DataSource, true), is this thinking correct? For example,

 

Max( DataSource, column) - cannot be delegated because Max operate directly on the data source

however

Max( Filter(DataSource, true), column) - will be performed correctly, because Max operate over the table returned by the Filter() which could be any number of rows, because the Filter() function is in that case completely delegateable.

 

Thanks

 

Ivan

Highlighted
irsimeonov
Level: Powered On

Re: Max() is not delegatable function however I am not getting a blue dot warning when I use it, why

i tested and MAX only retrieves the first 500 records although I dont get blue dot warning. So, Microsoft should make sure that the blue dot warning is displayed when people uae the MAX function otherwise it is deceiving.

Super User
Super User

Re: Max() is not delegatable function however I am not getting a blue dot warning when I use it, why

This is a really old thread, but the way I got around this is to use a completely separate SharePoint List Called IDNums with one item in it - two columns, one number column called NextRefID and one text column Title, and then have it do:

UpdateIf(IDNums, Title = "NextNum", {NextRefID: NextRefID + 1});

..whenever you navigate to a screen that creates a new entry - that way anyone who presses the 'new' button, even if they dont submit it, will always get a unique ID number.




Don't forget to 'Mark as Solution' if a post answered your question and always 'Thumbs Up' the posts you like or helped you!

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,534)