Behavior > Action (Only if this condition is true)

Greetings!
I'm having some difficult logic in "Only if this condition is true" behavior.
I should hide the behavior button in a condition which follow is true if the selected column is empty or blank, and the behavior button should appear when I used USEREMAIL() with my account, and if the column that I selected is not empty anymore, even if I login with my account, the behavior button should be hide. How should I write the logic for it? Please help, thank you.

Solved Solved
0 2 1,563
1 ACCEPTED SOLUTION

It's not clear how you intend to use USEREMAIL().  That function returns an email address of the logged in user.  So when you say "with my account" and "even if I login with my account", are you wanting to test against your email address specifically.  Or do you mean that you want to match USEREMAIL() of the logged in user (for any user) with some property on the row?

 

NOTE: the columns/literal in the examples below are for illustration only.  You will need to change them to the proper columns/ literal for yopur use case.

Taking your words literally,  The expression would be:

OR(USEREMAIL() = "youremail@something.com",  
  ISNOTBLANK([the selected column])
)

If you mean to match USEREMAIL() for any logged in user to the row, then you need to have recorded the logged in email address on the row at the time the row was saved or edited.  If you did then the same expression could be changed to look like this:

OR(USEREMAIL() = [Login email],  
  ISNOTBLANK([the selected column])
)

 

AppSheet Help OR()

 

View solution in original post

2 REPLIES 2

Hi @adhaputraa

In the action you are wanting to show/hide do the following - Navigate to Behavior >> Only if this condition is true >> ISBLANK([Column Name])

This will show the action button if the column is blank and hide the action button if the column is not blank. 

ISBLANK()

ISNOTBLANK()

Great question!

Thanks,

Austin from AppSheet Training 

It's not clear how you intend to use USEREMAIL().  That function returns an email address of the logged in user.  So when you say "with my account" and "even if I login with my account", are you wanting to test against your email address specifically.  Or do you mean that you want to match USEREMAIL() of the logged in user (for any user) with some property on the row?

 

NOTE: the columns/literal in the examples below are for illustration only.  You will need to change them to the proper columns/ literal for yopur use case.

Taking your words literally,  The expression would be:

OR(USEREMAIL() = "youremail@something.com",  
  ISNOTBLANK([the selected column])
)

If you mean to match USEREMAIL() for any logged in user to the row, then you need to have recorded the logged in email address on the row at the time the row was saved or edited.  If you did then the same expression could be changed to look like this:

OR(USEREMAIL() = [Login email],  
  ISNOTBLANK([the selected column])
)

 

AppSheet Help OR()

 

Top Labels in this Space