Hi @WarrenBelz and thanks for answering!
Yes that looks like what im am trying to achieve.
I will try to be more clear:
I need to have a function that generates an ID per each transaction submitted by the users. This ID have to be saved in the sharepoint list called "LIST" where all the input inserted by the users, in a column named "TransactionID"
The user while using the app has to select from a dropdown list "drdAgency" the agency code of his shop. (not all the agency codes are made of the same number of digits, can be both 4 or 5 numbers)
The ID associated to the transaction then has to be as follow
"XXXXX" - "YY"
where XXXXX is the agency code , that was selected by the user
YY a autoincremented number
basically the function should read the sharepoint column "Transaction ID" , get the last ID with same prefix and highest number, and generate a new ID with prefix and highest number + 1
I hope now I was more clear 🙂
thanks for supporting