We track projects in a PowerApp with a SharePoint list as the data source.
When a user creates a new project, PowerApps assigns a ProjectNumber by looking at the existing projects in the SP list, finding the one with the highest number and adding one.
This works great for everyone except for a user in Italy.
For example, adding a project today would assign "21-0042" as the next ProjectNumber, but the user in Italy gets "21-0001" -- he always gets 0001.
Here's the line that formulates the new ProjectNumber.
Right(Text(Year(Today())),2) & "-" & Right(Concatenate("0000", Text(Max(Projects,ProjNumInc)+1)) ,4)
Here it is separated into sections with explanations.
Right(Text(Year(Today())),2) //Get the right two digits of this year
& "-" & //add a hyphen
Right(Concatenate("0000", //Pad the result with zeros
Text(Max(Projects,ProjNumInc)+1)) //Get the Max entry in the ProjNumInc column (a number column) of the SP list and add 1
,4) //Trim the result so it's 4 characters.
How could it be this works for 15 users in various parts of the world except for one guy? Any help would be greatly appreciated.