Basic If Statement for a Show If

Can anyone suggest a formula to use (or work from) so that I can see the results of all the customer records that meet a certain criteria. All the data is in a single table.

I created a view from a slice and I want to show all the customers that have certain value in a column ("V" for visit).

I had no problem using the ISBLANK function. I know logic statements from Excel but I'm having a challenge with building logic query statements in AppSheet. 

Solved Solved
0 8 576
1 ACCEPTED SOLUTION

I read "show if constraint for view". That can't work.

You need to:

1) create your slice with the condition you want

2) create your view, based on this slice. No need to add a condition to this view 🙂

View solution in original post

8 REPLIES 8

Aurelien
Google Developer Expert
Google Developer Expert

Hi @Keith_Fairbairn 

You may want to have a look to the documentation here, you made half the pathway 🙂

Slices: The Essentials - AppSheet Help

Aurelien_0-1663734843496.png

Your expression must render a Yes/No condition. It is mostly a combination of equal signe, AND(), and OR() expressions.

For reference:

Yes/No expressions - AppSheet Help

In your case, it could be:

" I want to show all the customers that have certain value in a column ("V" for visit)."

[columnCriteriaName]="V"

 

Hi Aurelien,

Thanks for the suggestions. I've reviewed these tips already. And I still
am stuck on the expression(s) that I need to be able to make this happen.

It seems pretty straightforward what I want to do. Is the expression
example you provided containing criteria an actual expression/function. My
challenge is stringing together the different expressions/function
statements to get what I want. It's seems more complex than Microsoft Excel
that I can usually muddle my way through.


@Keith_Fairbairn wrote:

Is the expression
example you provided containing criteria an actual expression/function


Yes, as long as you substitute your actual column name for "columnCriteriaName".


@Keith_Fairbairn wrote:

My
challenge is stringing together the different expressions/function
statements to get what I want.


It sounds like you might need to rely on the AND and OR functions.

Hi Aurelien,

I appreciate your help here. So this is the result I get when I apply the recommendation:Screen Shot 2022-09-26 at 9.55.12 PM.png

 

I know this column [Call Type] is in both the slice that I'm working with and the main table.

I read "show if constraint for view". That can't work.

You need to:

1) create your slice with the condition you want

2) create your view, based on this slice. No need to add a condition to this view 🙂

This worked. Thank you!

Not sure why a "view" can't be pulled directly from main table instead of having to create a slice first and then the "view" wanted with the specified criteria ("V" in the Call Type).

Glad you made it 🙂

That's because basically, a slice is a dataset as is a table.

The view is "how you wish to see this dataset: a card type, a detail type, a table type, a map type", and so on.

But not "which filter you wish to apply to your dataset".

It is not to be confused with SQL Views, wich are the equivalent to Slices in AppSheet.

I hope I made it clear.

For reference, I suggest:

Slices: The Essentials - AppSheet Help

Views: The Essentials - AppSheet Help

 

Aurelien
Google Developer Expert
Google Developer Expert

Hi @Keith_Fairbairn 

Expressions are similar to what Excel does. 

You should just replace references such as A2 and B2 by [nameColumnA] and [nameColumnB].

Actually a lot easier than with Excel, I would say.

For reference: Expressions: The Essentials - AppSheet Help

If you want further help, please share further information.

What would you like to accomplish ?

Top Labels in this Space