Show_if and Refs

I have a form that shows pages conditionally based upon the data entered so far. Page 1 has Column A and B on it. Page 2 has column C and D, Page 3 has just Column E and Page 4 has Column F and G.

To create these pages I have VCs as Show columns of type page_header.

Column B is a column called “Quantity” and is a Number. Column E is a Ref but just to make this fun, back to another row in the same table.

If Column B is 1 then I show Page 2. I.e., I have a show_if expression on the VC for Page 2 of [Column B]=1. This works great. However when I get to Page 3 and I select a value from the Ref list for Column E, things are not as expected. Before selecting the value for Column E my navigation options are “Prev”, “Cancel” and “Next”. When I select a value from the ref list this changes to “Prev”, “Cancel” and “Save” as I would expect. However when I click save, I am then presented with Page 4 to fill in.

My show_if expression for page 4 is ISBLANK[Column E].

I tried adding a Form Save behaviour to trap what happens but this does not fire when I click save on Page 3 (it does when I click save on page 4). Is there a better expression I can add to the show_if on page 4 to resolve this?

[Edit: Incidentally, If I go back from Page 3 (after setting Column E) to Page 2 and then come forward again, not changing anything, Page 4 is not displayed when I click save. I think this confirms that the initial save is causing some nested behaviour that i am not quite understanding given the Ref is to the same table]

Thanks for the help.

Solved Solved
0 4 188
  • UX
1 ACCEPTED SOLUTION

For the record, I just applied the same show_if to all columns on Page 4 and that resolves the issue. I can live with this.

Let’s waste no more time on this. Thank

View solution in original post

4 REPLIES 4

Steve
Platinum 4
Platinum 4

That expression looks wrong.

Let me check because it should be ISBLANK([Column E]) but maybe that is the issue.

@Steve, sorry that was a typo and I have confirmed that my show_if expression is in fact ISBLANK([Column E]). Was your concern that I had typed it wrong or was there something more fundamental than this?

I have tried to think logically through the process here. Initially AppSheet believes that Page 3 will be the last page based upon the show_if expressions - hence it shows the Save button. When I leave that Page of the app something must be happening. If I go back to page 2 and come forward again, all is good, but if I just click Save on Page 3 after selecting the Ref value then Page 4 is shown.

I did some more testing also. I displayed the value of Column E on both Pages 3 and 4. The Column E was was displayed on both. I added the same show_if expression to Column F (which is on Page 4) and that column is NOT displayed.

Am I looking at the wrong thing?

For the record, I just applied the same show_if to all columns on Page 4 and that resolves the issue. I can live with this.

Let’s waste no more time on this. Thank

Top Labels in this Space