I have a general question about the best way ...

(Prof Stephen Colbran) #1

I have a general question about the best way to cater for branching logic. Here is a simple hypothetical example that seeks to make a conclusion whether someone is a resident for immigration purposes. Some of the questions (white rectangles) can be answered by a user in a Google Form feeding a Google Sheet and in turn AppSheet. Other questions are answered by a calculation (hexagon) based on the answers previously supplied by the user.

I thought I could use a virtual column in AppSheet including the calculation to come to the conclusion whether visa days is less than 100 days or otherwise. The relevant Residency conclusion is then compiled into a Report emailed to the user. Is there a better way to deal with branching decision structures leading to different report conclusions? Especially when there is a complex branching structure.

(Praveen Seshadri (AppSheet)) #2

The simple way to do this in an AppSheet app is to define all of the white rectangles as “question” columns and the grey rectangles as columns with AppFormulas. Then you add Show_If conditions for the question appropriately.

For example,

*) the formula for the ‘Law does not apply’ column would be [Age in years] < 21

*) for the next question column, the Show_If condition would be NOT([Law does not apply]) etc…