Hello people, I need to know how to select between two sets of ENUM buttons to show in my Form, based on the response given in the previous column, before saving the entry. This is how it works: the user chooses a task to do and before they want to start a new task, they must select the task END. After that, when they start filling out the Form again the entire list of options will show. Therefore, there are two sets of ENUM buttons:
(1st set) TASK1, TASK2, TASK3, TASK4
(2nd set) END
To do this, I have two tables A (user, task) and B(tasks). I have also a slice: SliceA(user, last task selected).
So, when the user types their user data in the form, the second column will show the task options. If the sliceA shows the last task the user typed was END, then it should show the 1st set of tasks (this means the user has already finished their task and is ready to take a new one. If the sliceA shows that the user is still doing a task (anything different than END), then the list of ENUM buttons must show only one option which is END (2nd set).
I appreciate your help!
Solved! Go to Solution.
To achieve this functionality, you can set up conditional ENUM button options in your form based on the user's last task selection. Here's how you can implement this in a step-by-step manner:
Table A (User Tasks):
Table B (Tasks):
SliceA (User's Last Task):
MAXROW("User Tasks", "Timestamp", [User] = USEREMAIL())
In your form, configure the ENUM column for task selection as follows:
Column Definition (Task Selection):
Valid If Expression: Use the Valid If field to dynamically filter the tasks shown based on the last task:
IF( LOOKUP(USEREMAIL(), "SliceA", "User", "Task") = "END", LIST("TASK1", "TASK2", "TASK3", "TASK4"), LIST("END") )
LOOKUP(USEREMAIL(), "SliceA", "User", "Task"):
Fetches the last task selected by the current user.
IF Statement Logic:
LIST:
Specifies the options to display dynamically.
This approach ensures the ENUM buttons dynamically adapt to the user's progress while maintaining the workflow integrity. Let me know if you need help refining any part!
I already found the answer. In the A table form edit screen, I selected the Task field and typed this below in the (Data Validity) --> (Valid-If) field.
=IF(LOOKUP([_THISROW].[user],"SliceA","user","last task selected")="END",{"TASK1","TASK2","TASK3","TASK4"},{"END"})
To achieve this functionality, you can set up conditional ENUM button options in your form based on the user's last task selection. Here's how you can implement this in a step-by-step manner:
Table A (User Tasks):
Table B (Tasks):
SliceA (User's Last Task):
MAXROW("User Tasks", "Timestamp", [User] = USEREMAIL())
In your form, configure the ENUM column for task selection as follows:
Column Definition (Task Selection):
Valid If Expression: Use the Valid If field to dynamically filter the tasks shown based on the last task:
IF( LOOKUP(USEREMAIL(), "SliceA", "User", "Task") = "END", LIST("TASK1", "TASK2", "TASK3", "TASK4"), LIST("END") )
LOOKUP(USEREMAIL(), "SliceA", "User", "Task"):
Fetches the last task selected by the current user.
IF Statement Logic:
LIST:
Specifies the options to display dynamically.
This approach ensures the ENUM buttons dynamically adapt to the user's progress while maintaining the workflow integrity. Let me know if you need help refining any part!
I already found the answer. In the A table form edit screen, I selected the Task field and typed this below in the (Data Validity) --> (Valid-If) field.
=IF(LOOKUP([_THISROW].[user],"SliceA","user","last task selected")="END",{"TASK1","TASK2","TASK3","TASK4"},{"END"})
User | Count |
---|---|
18 | |
10 | |
8 | |
6 | |
5 |