DROPDOWN LIST HIDDEN FIELD: SELECT WITH AND CONDITION PROBLEM

Salutations,
i have a problem with a dropdown list. As you can see from the following images
I have a text field ("Matricolanuova") with a list made with "Valid_IF".

Spider_2-1674987261275.png

Spider_0-1674987211128.png

Spider_1-1674987218878.png

As you can see the Valid_IF expression includes a SELECT with an AND condition. The expression is considered correct and doing a TEST returns the values โ€‹โ€‹I expect.
THE PROBLEM IS: when I execute the form in data modification, the field does not appear. I noticed that the problem is the AND condition in the SELECT. By removing it, and leaving only one field as a criterion in the SELECT, at which point the field appears in the Form.
Can someone help me?
Thank you very much

 

0 6 202
6 REPLIES 6


@Spider wrote:

THE PROBLEM IS: when I execute the form in data modification, the field does not appear. I noticed that the problem is the AND condition in the SELECT. By removing it, and leaving only one field as a criterion in the SELECT, at which point the field appears in the Form.


First there is some discrepancy between the "Valid_If" expression you are showing and that reflected in the test screen.  In the Valid_If it has =0  - a numeric value while in the test screen is reflects ='0' .  The literal type here needs to match the type of your column [Utilizzata].

Also note, Form fields with Valid_IF dropdown lists configured will NOT show in the Form if the returned list is empty.  If you DO want the field to still display even though there are no options to select from, then move the expression from "Valid If" to "Suggested Values".  You may then need to modify some of the settings to get the list selection to behave in a similar manner

If you feel that the list should NOT be empty, you will need to review the data, and their data types assigned in AppSheet, against your expression to confirm.

 

Bye and thanks for the answers. Let me start by informing you that I am aware that if a list is empty it will not be displayed. I must also point out that the images I posted are taken at different times of all the tests I did, so the second image where you see =0 does not refer to the third image where I did the TEST with value ='0'. However, I would like to reason on the TEST done precisely with ='0'. As you can see the "Expression result" column has values โ€‹โ€‹in some records and not in others, as I expect. From the TEST then the SELECT works well! The problem is that when I open the form the list field never appears, as if the SELECT that works in TEST in the FORM no longer works! By removing the "AND" condition, however, I always see the list even if with values โ€‹โ€‹that at that point are not good. I ask you, could it be that the SELECT with the "AND" condition in the form view has some problems? Have you ever checked it out? I repeat, the SELECT with AND in the TEST work (image 3) but in the FORM view the list field never appears!

Understood.

As @Marc_Dillon pointed out, in your Test results some rows are NOT returning a list.

Have you verified that when you test in the Form, that you are testing a row that will return a List?  For example, in your Image, RowNumber 3 and RowNumber 4 both return 3 values.  Open one of those rows in your Form and confirm you should see 3 values.  To contrast,  rows 5 and 6 each will reflect a single value in the list.  BUT RowNumber 2 and RowNumber 7 both have empty lists!


@Spider wrote:

I ask you, could it be that the SELECT with the "AND" condition in the form view has some problems?


Probably not!  I am 100% (well 99.9% - anything is possible) certain that you are testing use cases in your Form that result in empty list within your test column.

 

I can confirm that I have tried lines where I expect values โ€‹โ€‹(as you say ada example lines 3 and 4). But nothing, that SELECT with the AND condition seems to work only in test! You don't see the field when running the form in edit record!
I'll add another oddity.
Last test done, is to insert the SELECT in "Suggested value" and at that point the field appears in the form, but opening the list this is empty and with only the "Done" button displayed at the bottom.
Another strange thing I think. Seems like inconsistent behavior to me

A field won't show up if there are no valid options to be selected. On your test screen, you can see that for rows 2 and 7, there are no valid options, so if you're editing one of those rows, the field won't show up.

Hi, you can see what I wrote to WillowMobileSys. Maybe you have more information to evaluate the problem.

thanks for the reply

Top Labels in this Space