
Announcements
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?
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: