web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Next incremental Numbe...
Power Apps
Unanswered

Next incremental Number of a Number Field In a SharePoint List (Warning)

(0) ShareShare
ReportReport
Posted on by 73

Hi all, 

 

So i have been trying to get the next incremental number on a Sharepoint List field (number) and i am using this code in the default property of this field in the powerapp form: 

 

Max(Filter(RRF, true),'RRF ID')+1

 

Where RRF is the datasource (sharepoint list) and RRF ID is the field name 

 

It is working fine but i have a warning: This predicate is a literal value and does not reference the input table

 

Can i ignore this message or will it effect the application somehow ?

Categories:
I have the same question (0)
  • Verified answer
    CarlosFigueira Profile Picture
    on at

    You're getting this message because of the nested expression

    Filter(RRF, true)

    You are filtering the data source, but the expression that you use does not reference any columns from it - this is usually an error, as that expression is equivalent to

    RRF

    If it is not an error in your part, then yes, you can ignore it.

    There is another issue, however - if the number of items in your SP list starts growing, you may reach the delegation limit (the 'Max' function is not delegated (for more information on delegation, see this link). One way to work around this would be to sort the items based on your column in a descending way, and take the first element (which would be the higher):

    First(SortByColumns(RRF, "RRFID", Descending)).'RRF ID' + 1

    You may still see a delegation warning (that the 'First' function cannot be delegated to SharePoint), but that would be ok as it would apply to a sorted result.

    Having said all that, I believe that SharePoint does have by default an auto-incremented id for items of its lists. The column "ID" is hidden, but you can show it in your sharepoint list (and access it from Power Apps), so you may not need to calculate it - let SharePoint do it for you.

    Hope this helps!

  • kriscachia Profile Picture
    73 on at

    Thanks so much worked perfect. Yes i got delegation warning, Nice Trick with the sorting

     

    Cheers again. 

     

    Regarding using the sharepoint ID as the RRF ID, I wanted to have some more control on the ID's are being added so that if the need arises to delete the list row then I can reuse the RRF ID that was deleted. If I use the sharepoint ID and delete the row, i cannot reuse the ID. 

     

    But yes agree sharepoint ID as increment is very useful, using it in various other lists.  

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard