I’m seeking a little help. I’ve been trying for days to find a solution. I’m creating a system where each user can select a number from A1 to A99. However, if a user selects a number that has already been taken, a letter needs to be added. For example:
Carlos - A1
Andres - B1
Juan - C1
Diego - A2
Camila - A4
Tom - A5
In the following system, when a user selects the number 1, they will be assigned D1. If another user selects the number 1, they will be assigned E1, and so on for all numbers from 1 to 99 in sequential order.
Thank you for your assistance.
Create two option sets with your letters, and the other with your numbers (or you’ll have to setup more constraints later).
Just create a new database.
Add a USER field, add the LETTER OPTION SET, and the NUMBER OPTION SET you just made to that database object.
Each time a user makes or chooses the number, save their username, the letter, and their number they chose into that database.
Later you can search to see if that name, letter, and number exists in the DB, and display that specific thing (the persons name, letter, number).
Simple once you get the hang of it!
but the user must only select the number and the system must generate the letter consecutively according to the previous ones or start in A80 example.
The user receives an email with the complete information of the letter that was assigned to him and the number that he selected
Just have the letter be random then. If the letter/number combo exists, try a different one. Repeat until unique. Use it as a backend workflow.
to maintain order and the data we need must be consecutive
Then add an ORDER COUNT to the letters options.
I’ve been trying for days but I can’t perform the two searches, I can search for the number and take the next or other options.
but I couldn’t search for a number and search for a letter and assign a consecutive letter, that’s why I’m writing in the forum.
thanks for the information.
Hi there, @lordcortes… just for kicks (my own, of course), I created an example that is pretty much (if not exactly) what Ghost described, and I will share some screenshots so you can use them as a reference. But first, be aware that the unique letter/number combinations might not be unique if users select numbers at the same time. If you want to learn more about that (and you should), read this post, and while you’re at it, read the entire thread.
The above being said, I started my example by creating a data type called
User Unique Num. I created two options sets, one for the numbers called
OS Numbers and one for the letters called
OS Letters, and I added an attribute called
number (of type number) to the letters option set so I could give each letter a corresponding number (1 through 26, obviously). With the option sets in place, I created two fields in the
User Unique Num data type… a field called
number that links to the numbers option set and a field called
letter that links to the letters option set.
Next, I added a dropdown to the page that displays the options from the numbers option set, and I added a button that creates a thing in the
User Unique Num data type. There are two workflow events associated with the button, and the first one looks like this.
That event will always assign the letter A when the number selected in the dropdown hasn’t already been used. The second workflow event looks like this.
That event will find the last thing in the
User Unique Num data type that has the same number as the number selected in the dropdown, and then it gets the letter that is after that thing’s letter. Note that the searches on the workflow event and the list filter have the same constraint as shown in the first screenshot.
Anyway, I tested those workflows, and they do exactly what you described, but again, the letter/number combinations might not always be unique unless you combine what I have shown with the information in the linked post.
Hope this helps.
Gracias por la ayuda. @mikeloc
I only have this error I can’t add the operator + I have the wrong data type but I don’t know
Does your number attribute have an attribute type of number? If it does (which would be correct), then you probably need to go to the Settings >> Versions tab and enable the experimental parentheses feature in order to be able to build out the entire expression.
This topic was automatically closed after 70 days. New replies are no longer allowed.