Behaviors/Automations Not Working

I have an app with two tables. Before I knew what automations were, I had created Behaviors for adding a row from one table to another table. Since I did not want a manual click on an icon for every behavior, I created a bot and an event that is triggered by an update in a status column from one value to another. My end goal is for that event to trigger several behavior data add rows to the 2nd table for a list of events that need to be completed. I cannot get this to work. At best it only triggered one of the several behaviors.

I am making the updates in the app, not the google sheet, so I know that is not my problem. My formula for the event is a before after value formula that has already been confirmed as correct by this community. I have even tried re-building the behavior as a process...and I think that may have worked at one point, but then when I added a second process to an event, the second process did not trigger. Please help.

0 12 667
12 REPLIES 12

First, before going to far down the Bot path, using Actions to add rows to another table is perfectly acceptable.  There is another feature in AppSheet where you can attach an Action to the Form Saved Behavior.  This action can be a grouped action that combines a list of actions to be executed together.  The action(s) are run automatically on each Save

The advantage of using this approach of attaching an action on Form Saved, is that the activity from the actions is performed on the device and almost immediately available to the user to interact with. 

Using the Bot to do the same means that the updates are made on the server and would not be available to user until after a Sync has been performed which is delay from a few seconds to minutes depending on complexity of the updates and the app itself.

If you do not need these new rows to be available immediately, then I would recommend continuing down the path of using a Bot.

Which approach from above would you prefer? 

I do like the idea of the form and the information being available immediately, however, itโ€™s for a table that has many updates over time and it is only one field that triggers the series of tasks that should be added to the tasks table. I didnโ€™t see a way to do the form action based on a column result. If there is a way to do that, I would prefer that way.

Does this methodology end up updating the 2nd table in google sheets as well? I have a team using the app and need the information accessible to multiple people.

Please see TREC Information About Brokerage Services<>
Please see TREC Consumer Protection Notice <>



Delaine McMurry
Realtor & Team Lead with Your Austin Living Group
Austin Expert

GRI, RENE, SRS, PSA

Brokered by REAL
License #734232
Pure.Simple.Realty.

[linkedin]<>
[email]
[phone]<>








[facebook]<>
[instagram]<>
[youtube]<>
[website]<>





Copyright ยฉ 2022 Your Austin Living Group, All rights reserved.

Our mailing address is:
Your Austin Living Group
brokered by REAL
2626 Cole Ave, Ste 300
Dallas, TX

IMPORTANT NOTICE: Never trust wiring instructions sent via email. Always independently confirm wiring instructions in person or via a telephone call to a trusted and verified phone number. Never wire money without double-checking that the wiring instructions are correct.

CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information protected by law. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.


@mcmurm01 wrote:

... I didnโ€™t see a way to do the form action based on a column result. If there is a way to do that, I would prefer that way.

Does this methodology end up updating the 2nd table in google sheets as well? I have a team using the app and need the information accessible to multiple people.

Yes you can control execution of each action based on some criteria - including some column result or column change.  

The name of this property in each action is "Only if this condition is true".  You insert any valid expression to determine if the action runs or not.  For example, a simple expression might be

[The Column] = "Some Value"

Or maybe you want to run the action only if the value changed to 'Some Value'.  Then expression might be:

AND([_THISROW_BEFORE].[The Column] <> [_THISROW_AFTER].[The Column],
[The Column] = "Some Value"
)      

The "[_THISROW_***]" are keyword constants available in certain contexts to get before and after row states.

Updates to Other Tables

Yes, if you include an appropriate action, you can update any table information in the app.  There are actions I call "bridge" actions that allow execution to transition from one datasource to another allowing updates to additional datasources.  Performing updates, as opposed to Adds, can be a little tricky if needing to pass values from a source row to a target row to update.  There is an INPUT() function but the jury is still out as to whether this function is still considered a Beta feature.  I have a couple of apps that do not have access to this function. Regardless, there are other ways to work around the problem of passing data values - if needed.

Also, keep in mind that you can create a Hybrid solution where a portion of the updates are done on Form Save while others are done with a Bot.

I have actions created with the before/after formulas like you mention, but donโ€™t see how to automate those without a bot. Is there a way to automate an action on the behavior tab? Do you have screenshots of the form save actions you are referring to?

Please see TREC Information About Brokerage Services<>
Please see TREC Consumer Protection Notice <>



Delaine McMurry
Realtor & Team Lead with Your Austin Living Group
Austin Expert

GRI, RENE, SRS, PSA

Brokered by REAL
License #734232
Pure.Simple.Realty.

[linkedin]<>
[email]
[phone]<>








[facebook]<>
[instagram]<>
[youtube]<>
[website]<>





Copyright ยฉ 2022 Your Austin Living Group, All rights reserved.

Our mailing address is:
Your Austin Living Group
brokered by REAL
2626 Cole Ave, Ste 300
Dallas, TX

IMPORTANT NOTICE: Never trust wiring instructions sent via email. Always independently confirm wiring instructions in person or via a telephone call to a trusted and verified phone number. Never wire money without double-checking that the wiring instructions are correct.

CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information protected by law. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.

Any action can be attached to the Form Saved behavior.  Each Form has a Behavior section.  Expand it on the Form you wish to trigger the updates from.  Under the Behavior section is an Event Actions area that includes a Form Saved property with a dropdown list.  Inspecting the list you will see all of the actions you have created for the datasource the Form represents.  See image below.

Screen Shot 2022-09-03 at 8.28.48 AM.png

This article below provides a brief description of all Event Actions:

View Events

 

ok, so the action behavior determines if an action will take place, so that is where I would put my before/after expression and then I would link that action to my form event?

And if my form has several actions that happen based on different behaviors, I would create different instances of my form for each action behavior?

Let's be more clear...

The Form Saved Behavior WILL trigger the attached action.  Period.

Inside of the action is the  "Only if this condition is true" property which determines whether that action performs the activity or not.  So the action could be triggered but not actually perform any activity because the conditions are not met.

If you need to perform several actions upon form save - no need to create different forms.  You would do this using a GROUPED action.  A grouped action allows you to list several actions to be triggered in sequence.   (see image below)

You can set run criteria on the Grouped action itself to determine if the entire group runs or not.  Then you can set criteria on each individual action to decide if that action runs when the Group is triggered.

 

Screen Shot 2022-09-05 at 10.19.26 AM.png

so, my question on creating multiple form views is based on this comment under additional notes in the view link you sent: 

  • To configure Form Saved Events, you may need to create a new form reference view first.

The other reason I ask that is because right now, the way I have the actions set up is with a grouped set, but each grouped set is based on a different form save logic. This keeps the actions related to a specific change organized for future changes in code, if necessary. Can I group together group actions as a form event so that all of my save scenarios are accounted for and have the appropriate response sets of actions?

Yes. 

I was answering from the perspective of you have an existing Form and now want to perform some actions upon Save.  You don't need create additional forms simply because of different actions you want to have happen.

On the flip side, your user processes may naturally gravitate towards having multiple Forms against the same table. 

For example, let's say you have an Order Form and for NEW Orders a user enters the Order details + Customer details.  But for existing Orders, it is preferred to "Update Order Details" OR "Update Customer Info" and have separate Forms for each of these tasks.  You then may need tailored Grouped actions to attach to each of these different Forms.

 

from what I can gather from reading articles, I either need to create a ref form to my main form so I can create multiple save actions based on different criteria at different stages of the transaction. not sure how to do the ref form after reading the articles.

maybe it would just be easier to create bots and I was struggling to get that to work. can someone either help with the ref forms or creating a bot that handles multiple activities per save action? maybe even a best practices and pros and cons of each way to do it?

essentially I'm looking for the most efficient as far as systems go in terms of user experience and backend creation so the system operates effectively and efficiently.

Let's go down the Bot path.  Can you show the Bot you created with several actions where only one of them executed?

unfortunately, I made so many modifications since then trying to test different things, that I don't have that scenario anymore. last time I ran if before messaging on the board, nothing executed at all...but I have made updates since then.

if I change it over to bot, then I don't need the behavior rule on the grouped actions, right? because the bot event will take care of that?

Top Labels in this Space