cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
irsimeonov Helper I
Helper I

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.


@iAm_ManCat
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!

Thanks!
You and everyone else in the community make it the awesome and welcoming place it is,
keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

4 REPLIES 4
Community Support
Community Support

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 Helper I
Helper I

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

irsimeonov Helper I
Helper I

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.


@iAm_ManCat
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!

Thanks!
You and everyone else in the community make it the awesome and welcoming place it is,
keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (5,339)