Valid_If causes field to be hidden.... My in...

(Michael) #1

Valid_If causes field to be hidden…

My interpretation of the Valid_If field is to validate the data entered into a field rather than determine whether the field should be hidden or displayed. Is this correct?

I have a expression that validates the choices presented to the user for selection. This expression checks to see if another field is blank or not. If the field is blank, it SHOULD present the user with an unfiltered list of choices. If the field being checked is NOT blank, it should display a list of options where criteria is met.

Currently, the expression is also determining whether the field should be displayed in addition to filtering the list of options.

I would like the field displayed regardless of the condition of the other field. I have set show_if to TRUE and disabled universal show_if. This seems to have no effect.

Both of the following expressions cause the field to be hidden if the checked field is blank. Any help would be greatly appreciated.



@Aleksi_Alkio @praveen

(Michael) #2

Something definitely

wrong here…

If the user selects invalid an option, the field is hidden from the user rather than notifying that the selected option is invalid. Ideally, the expression should prevent invalid options from being shown as an option but while testing the expression I see this behavior… Is it something in my setup or a bug?

(Steven Coile) #3

If your Valid_If expression produces a list, and that list contains no items, AppSheet interprets that to mean there are no valid options for input for that column, then hides the column with the rationale that the user shouldn’t see a column for which they can provide no (valid) input.

(Steven Coile) #4

Your first expression isn’t doing what you think it is…because of one missing detail! Try replacing ISBLANK([_THISROW].[Corridor]) with NOT(ISBLANK([_THISROW].[Corridor])). You also don’t strictly need [_THISROW]. in there, either, but it shouldn’t hurt anything.

(Michael) #5

+Steve Coile Thanks for the input Steve. What you say makes perfect sense except for one thing; I specified in the Show_If field that the field should always be shown. Here’s why:

Two fields, A & B. User selects an option for A. B has a valid_if expression that uses data entered into A to determine valid options to show the user for field B. User then selects an option for B. If the user then goes back and changes A making the selected option in B invalid , B is then hidden from the user and cannot be changed. Also the user has no idea what has happened as the field is gone and no message is displayed to the user.

I have tried using various expression in the Show_If field to ensure the field is always shown but this seems to be ignored…

(Steven Coile) #6

@Michael One way I’ve worked around this is to consider the value already in the column valid: just add [_THIS] to the list of values allowed by Valid_If.

Alternatively, set Editable_If for A to =isblank([B]), forcing the user to clear B before being allowed to edit A.