I have a table of Inspection Reports, each one belong to a certain project ( dropdown selectable table or Projects).
I have the requirement to create a unique reference number for each of this report that is like:
IR-PRJ-xxx
where the prefix IR is always the same, and PRJ is the code name of the project ( that is present in the relative field of the selected project: this is easy to get with a cascading dropdown and a virtual number), while xxx is a running number that is unique only within the same project.
So somehow need to be implemented an algorithm that check what is the latest number with that specific project and increase by one, and finally creates the concatenate content in the field "reference".
I have no idea on how to implement. Should I use SQL? If so how?
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
srufini
Hi all,
I am trying to achieve the current feature.
I have a table of Inspection Reports, each one belong to a certain project ( dropdown selectable table or Projects).
I have the requirement to create a unique reference number for each of this report that is like:
IR-PRJ-xxx
where the prefix IR is always the same, and PRJ is the code name of the project ( that is present in the relative field of the selected project: this is easy to get with a cascading dropdown and a virtual number), while xxx is a running number that is unique only within the same project.
So somehow need to be implemented an algorithm that check what is the latest number with that specific project and increase by one, and finally creates the concatenate content in the field "reference".
I have no idea on how to implement. Should I use SQL? If so how?
Thanks a lot!
Sergio
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.