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 / Inspection App - probl...
Power Apps
Unanswered

Inspection App - problem in incrementing the inspection's automatic numbering

(0) ShareShare
ReportReport
Posted on by 10

Hello
Above the value of 500 inspections performed, the automatic number given to the inspection name is always 501.
I think it's a delegation issue, since the auto-number code is as follows:

 

ClearCollect(
colLastInspection;
Patch(
'Area Inspections';
Defaults('Area Inspections');
{
Location: gblSelectedLocation;
'Started On': Now();
Checklist: gblSelectedChecklist;
Name: gblSelectedLocation.'Location Type'.'Menu Label' & "_" & CountRows(colActiveInspections) + 1;
'Review Status Code': 'Area Inspection Review Status Code'.Incomplete
}

 

The countrows function should only allow querying the first 500 rows of the colActiveInspections collection, I think?
At this time any inspection performed has the number 501 at the end of the name, and I can only change the value in the data source manually.
Any tips to work around this problem?

I have the same question (0)
  • Verified answer
    Z_Lukowski Profile Picture
    216 on at

    Hey,

    So you cannot create function for Countrows() collection, your delegation won't allow it, what you seek is Autonumber based on DataSource, Assuming you're using Dataverse there is field type autonumber which will be generated automatically when you create the field.

     

    Also if you want Custom ID, for example  Date + your string + Autonumber I can show you how its done,

    I've created this youtube video just for you with the solution (hopefully) to your problem:

     

    https://youtu.be/pwF-NXs2tHI

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard