Hi All, Is it possible to make an EnumValue u...

Hi All, Is it possible to make an EnumValue unselectable if the same column is encountered via a different row for the same individual?

For example, In the table “Management”, I have an Enum type column called “Management Option” which has 3 Enum values in it. 1) Surgical 2) Non-surgical 3) Pending MDT Decision

Since the “Management” table is a child table for the parent table “Personal Details”, the user can create any number of management option rows for the same initial patient. Let’s say a patient is being managed non-surgically initially. So the user selects Non-surgical as the Enum value from the drop-down menu and proceeds to fill the details pertaining to it. Now if the patient’s management has changed, and the patient is undergoing surgery, the user can create a new management row and select “surgical” from the Enum values and proceed to fill the details pertaining to that. That is exactly what I want, but when the user enters the ‘management’ table again to select ‘surgical’, I would prefer if the ‘non-surgical’ option is not selectable for the user (like it’s inactivated or not visible), so that the user can’t create another row for ‘non-surgical’, but can only select either ‘surgical’ or ‘pending MDT decision’. Is this something doable within AppSheet?

0 3 370
3 REPLIES 3

Yes, it is possible, you could use a conditional expression in the Enum column’s Valid_if to check see if “surgical” value already exists in the child Management table for that particular Personal Details’ row ID, and in that case return a shorter list which excludes “non-surgical”; something along the lines of:

IF(IN(“surgical”,SELECT(…)), LIST(“Pending MDT Decision”, “surgical”), LIST(“Pending MDT Decision”, “Non-surgical”, “Surgical”) )

I will leave the SELECT(…) part to you.

@RezaRaoofi Thank you for the reply. I’ll try this!

Hi,

I am having a similar issue that I am having trouble with which I would like some help.
I have a Enum field called “Status” with the following enum values (Non Initiated, Initiated, Terminated, Suspended, Paid) . I would like the user to be able to select the 4 first values Non Initiated, Initiated, Terminated, Suspended) and the last one (Paid) to be dependant of another field called “Date of Payment”
So basically once “Date of Payment” is inserted than “Status”=Paid no matter the previous selection.

can you guys help me to make this work?

Top Labels in this Space