Can't use [_THISUSER] in Input action's behavior

sak
Bronze 5
Bronze 5

Here's how to reproduce the bug.
1. Create Data Action: Set values of some columns in this row
2. Create Input in Advanced section.

3. In Behavior's section, if I use any condition that compare a value to [_THISUSER]...., the result would be always be false.

After that, delete the all inputs in the Input section, the action would reappear without any change in the Behavior section.

0 12 334
12 REPLIES 12

Steve
Platinum 5
Platinum 5

Comparing anything to [_THISUSER] is meaningless. Do you mean USEREMAIL()? What are you trying to accomplish?

sak
Bronze 5
Bronze 5

Hi @Steve ,

To answer your question, I didn't meant to use USEREMAIL(). What I was trying to do was limiting some actions to only some "modes" of the app. By "mode", I mean the selection that the user could choose from the Settings view.

Could you please elaborate more on why comparing anything to [_THISUSER] is meaningless?

Aurelien
Google Developer Expert
Google Developer Expert

Hi @sak 

If you have a settings like "Language Option", then you can use:

[_THISUSER].[Language Option]

which is equivalent to:

USERSETTINGS("Language Option")

 


@sak wrote:

What I was trying to do was limiting some actions to only some "modes" of the app. By "mode", I mean the selection that the user could choose from the Settings view.


In this specific case, I imagine you are willing to use:

[_THISUSER].[modes]

Where [modes] would be a selection from the user.


@sak wrote:

Create Input in Advanced section.


I would rather use this:

INPUT("message", "value")

Like here:

Aurelien_0-1730094909775.png


@sak wrote:

3. In Behavior's section, if I use any condition that compare a value to [_THISUSER]...., the result would be always be false.


Please note INPUT() expression is in beta and may not work as expected.

Hi @Aurelien 

I thought we should be using [_INPUT].[input_name] instead of INPUT() according to this article;

https://support.google.com/appsheet/answer/11623804?hl=en

Aurelien
Google Developer Expert
Google Developer Expert

I' ve been following the thread about this, I recognize I didn't followed it very closely.

However, is it something that may help you into solving your situation?

No, the problem is not about the [_INPUT] function itself. But the bug occurs when I create Input in Advanced section and simultaneously specify some condition in "Behavior:Only if this condition is true" section comparing [_THISUSER].[...] to some value. 

Aurelien
Google Developer Expert
Google Developer Expert

Well I just ran a test. Seems to be working for me !

Aurelien_0-1730106838643.png

Aurelien_1-1730106890233.png

 

I tried with this condition:

Aurelien_2-1730106924565.png

 

Can you share what is your condition expression?

 

 

Hi @Aurelien ,

Try setting up Input in Advanced section like this:

sak_0-1730177341650.png

 

Aurelien
Google Developer Expert
Google Developer Expert

Does the condition returns true?

Also, can you try this?

Aurelien_0-1730183904477.png

 

To answer your question,

1. Yes, the condition is true. I set the Option 5's value to "test" in the Settings.

sak_0-1730215942518.png


2. I tried using INPUT() as you suggested and it's still not working (by not working, I mean the Action button doesn't show up despite the fact that the condition is true)

Aurelien
Google Developer Expert
Google Developer Expert

OK, I don't see how I can help you then, I would say either I'm missing something, or it's a bug. 

Did you try NOT using INPUT() and just applying a random value with the same condition on your action?

If it still doesn't work, then you may want to file a ticket here: Contact Us - AppSheet Help

 

Yes, it works when I just use some random value without the INPUT() with the same condition

Top Labels in this Space