Hi,
In my app, a user selects a event number and provides description for this event. Event numbers are simple list 1,2,3,4 etc to 30. I made it a dropdown enum
field. However, I also need to ensure that the user cannot select the same event number twice AND cannot select a value less than the latest selected event number, i.e. cannot select 2 when the latest was 3 for instance.
Something like VALID IF [THIS VALUE] > MAX Value FROM table_of_values
Solved! Go to Solution.
@AlexShevyakov
ะขะตะฟะตัั ั ะปัััะต ะฟะพะฝะธะผะฐั ะฒะฐัั ะฟัะพะฑะปะตะผั. ะกะฟะฐัะธะฑะพ ะทะฐ ะพะฑัััะฝะตะฝะธะต.
SELECT($SheetData[VoyageN],TRUE, TRUE) - SELECT(Voyages[#ะะ],TRUE, TRUE)
@AlexShevyakov
I believe it would be easier to list the unused event numbers in your Enum dropdown
{"1" , "2" , "3" , ..... "30"} - SELECT(TableName[EventNumberColumnName],TRUE, TRUE)
@LeventK
Hm, not quite sure how to implement this - probably a bit unfamiliar with this logic. Evidently, substituting with actual names I get the following VALID IF
expression:
SELECT($SheetData[VoyageN],TRUE, TRUE)
However, the dropdown operates as before, I can select same number n times.
Am I missing something?
@AlexShevyakov
Are you populating the dropdown content from the same table and column that you are querying? How do you construct the list of event numbers from 1-30? Can you please elaborate?
@LeventK
Sorry for delayed response. I have a service table $SheetData
which containes pre-populated event numbers from 1 to 30.
User creates an event (a voyage) and is prompted to enter event number. For this, I use enum
type and VALID IF expression such as $SheetData[VoyageN]
which pulls the data (voyage numbers from 1 to 30) from the table $SheetData.
SELECT($SheetData[VoyageN],TRUE, TRUE) - SELECT(EventTableName[EventNumberColumnName],TRUE, TRUE)
Please remember if two users are adding the event number at the same time, they will have the same number and you canโt directly avoid that.
The app will be used by a single user at a time, this is ensured through the workflow.
@LeventK
But this is exactly what I used before - you may see a screenshot above.
I had entered SELECT($SheetData[VoyageN],TRUE, TRUE)
it as VALID_IF expression.
Am I missing something?
@AlexShevyakov
Iโm not sure if I have understood you correctly. Please confirm the following:
1.) You have a Service Table (named as $SheetData as you speak) which contains a pre-populated event numbers from 1 to 30
2.) You have an Events Table where you create event records and have an [Event Number] column, which is Enum Type where you select an event number
Are these correct?
@LeventK
All data is within a single Spreadsheet.
Sorry , should probably learn how to describe problems clearly(((
@AlexShevyakov
ะขะตะฟะตัั ั ะปัััะต ะฟะพะฝะธะผะฐั ะฒะฐัั ะฟัะพะฑะปะตะผั. ะกะฟะฐัะธะฑะพ ะทะฐ ะพะฑัััะฝะตะฝะธะต.
SELECT($SheetData[VoyageN],TRUE, TRUE) - SELECT(Voyages[#ะะ],TRUE, TRUE)
@LeventK
Much appreciated! Thank you - ะกะฟะฐัะธะฑะพ - teลekkรผr ederim!
@AlexShevyakov
ะะต ะทะฐ ััะพ โฆ ะะฝะต ะฟัะธััะฝะพ ะฟะพะผะพัั
Hm, the issue however, is when you try to edit previous record in the Voyages table (= event table), the system says: the entry is invalid. Apparently it thinks that I have just entered this value whereas it is reading from the table Voyages.
User | Count |
---|---|
42 | |
29 | |
22 | |
20 | |
15 |