Hello,
I'm trying to create a BOT with a condition where a value from a virtual column.
The virtual column is updating when the user is adding a new value in a specific form.
My goal is to use that VIRTUAL COLUMN as a trigger and send an email. I'm using this formula to check the condition :
and(
[_THISROW_BEFORE].[Virtual trigger]="false",
[_THISROW_AFTER].[Virtual trigger]="true"
)
I can see that the value is changing but if I'm going to look the test Function Appsheet looks like doens't see the change.
Thanks in advance
Solved! Go to Solution.
The changing in evaluation of a Virtual Column expression cannot trigger a Bot. A Bot can only be triggered by an actual data change. I assume the part that you haven't mentioned is that the data change is happening in another table/record besides the one where the VC is. You'd have to set up the Bot to trigger on that table, and use the VC's expression in the Event condition.
None of this has to do with THISROW_BEFORE/AFTER, that's a red herring here.
As far as I tested, VCs in a bot's trigger condition work just fine.
@AndreaSangalli wrote:
if I'm going to look the test Function Appsheet looks like doens't see the change.
The Editor's test function simply does not see before and after. Have you tried to run the bot and see if it works?
Yes, the Editor is give me FALSE also if the VC os TRUE.
if I test the bot manually itโ is working, when I use the app doesnโt work,
btw thank for your time
@AndreaSangalli wrote:
when I use the app doesnโt work,
How does it NOT work? What does the Monitor say? Any errors?
Try by removing double quote from your expression.
and(
[_THISROW_BEFORE].[Virtual trigger]=false,
[_THISROW_AFTER].[Virtual trigger]=true
)
It works fine with quotations in my case. The VC1 is a yes/no type.
I suppose it is worth a try (even a good practice not use quotations) since I have seen some inconsistent behaviors with expressions containing logical comparisons before like here.
"The Trigger" is a IN Function that is looking for a determinate scenario of different possibilities.
I'm worry that I need a action button for trigger the event for this case
The changing in evaluation of a Virtual Column expression cannot trigger a Bot. A Bot can only be triggered by an actual data change. I assume the part that you haven't mentioned is that the data change is happening in another table/record besides the one where the VC is. You'd have to set up the Bot to trigger on that table, and use the VC's expression in the Event condition.
None of this has to do with THISROW_BEFORE/AFTER, that's a red herring here.
but i have an actual data chaning in the table.
On the same record that holds the VC?
The part of the VC is looking in looking in another table
In([daily scenario],List(12,21,22,210,300,400,201,211)))
Where daily scenario is another table
Let me try to be more clear.
You have a Virtual Column on Table1.
A data change (like a form being saved) happens on Table2.
Are Table1 and Table2 the same table or not?
no different Tables
Right, so my assumption in my first comment was correct. Please re-read the first comment closer. You have to set up the Bot on Table2.
I was wondering if it's necessary to have a change in the event to trigger the email or not.
User | Count |
---|---|
37 | |
30 | |
29 | |
22 | |
18 |