Use a slice when a column value is updated

Hello All. New to appSheet. I have a form that is being completed in the field. As an example the form has 20 fields. The first few fields are general pedigree about the client. The next field is a enum where the employee selects the type of service performed. They can choose parts or parts and labor for example. If they only choose parts then they do not need several of the following fields. If they choose parts and labor they need them all. I made a slice that shows exactly what they need for parts only and called it parts. Is it possible that when they select parts from the “dropdown” it can dynamically change the form to use the “parts slice” as opposed to the entire form.

I guess another way to describe would be can a selected dropdown value dynamically hide fields that are further "down " in the form.

These completed records are set to ref the client table. In my setup I like the nested feature that when you lookup a client you can see their previous tickets and add a new one etc. I would like to add a new one from their record screen and then accomplish the above, which seems to load the whole 20 field form and i am stuck with unnecessary fields. This would be preferred over creating another button on the bottom etc. Alternatively a pop-out or modal that asked parts, parts and labor and then loaded a slice would be great from the customer record. Not sure if any of this is possible. Thanks in advance.

Hello, welcome to AppSheet!

I think you can achieve what you want by setting some of your columns to only show when your enum value is set to “parts and labor”

In table, click “View Columns” and it will take you to this page:

You’ll need to click “Show expanded view,” highlighted in red, to enable the functionality for showing a column conditionally. After that, you should see this:

When you click the expression icon under “Show?” it will open up the expression editor, and you can enter an expression which will decide whether or not the column will be visible:

In this case, you want the expression to be:

[service]="parts and labor"

You can repeat this process for any number of columns, and they’ll only show up in your app when service is set to “parts and labor”

1 Like

Thanks, that works great. Out of curiosity will this type of functionality/ formula schema slow down the application much? I know some formulas i.e. nested if statements can really be taxing on the resources.

1 Like

I dont think this type of

expression gives the visible and remarkable performance issue, as the expression could be “cheap”. The expensive expression such as Select () with the where condition, yes, it surely slows down the app performance though.

1 Like

Very helpful, Thanks for the quick answer.

1 Like