Use a slice when a column value is updated

JSig
New Member

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.

0 4 218
4 REPLIES 4

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โ€

JSig
New Member

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.

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.

Very helpful, Thanks for the quick answer.

Top Labels in this Space