Hello Experts ,
I have one field in my power App call ActivityID , i want this activity ID to be auto generated and increment by 1 whenever new record created, so i am writing this on datacard value.
If(Frm_02.Mode= FormMode.New,Concatenate("BG-",Text(Right((Last('BG Activity Recorder').'Activity ID'),Len((Last('BG Activity Recorder').'Activity ID'))-3)+1)),Parent.Default)
But this only works when i am continuously working on the app , when i close app and open again its start with some random value which already exist in my SP list.
ideally this code should check last number inserted in the SP list and increment it by one as per the format. regardless from where i am inserting record (Phone or System). when i am generating record from phone it does not take the last inserted activity number. it takes some already exist number. please advise my requirements are below.
: field should generate automatic sequence number when we create new record
: it should check the last inserted number in SP list and then increment by 1
: if one person entered record and it saved in SP list , it should take another sequence number.