Workflow doesn't trigger if I update more than one field

I have a workflow that is set to trigger on update for my table.
[_THISROW_BEFORE].[CONFIG_ID]<>[_THISROW_AFTER].[CONFIG_ID]
This is the conditional expression that I have. If I only edit the CONFIG_ID then it updates perfectly fine once the change syncs through. If I update more than one field, like I have the CONFIG_ID then go edit my Invoice Total and bill date before my CONFIG_ID change goes through the workflow does not trigger. Is this a bug or a problem with my expression?

Solved Solved
0 17 795
1 ACCEPTED SOLUTION

You can watch this in the database as well, you might have to keep refreshing the table view.

Do App Formulas fire based on Quick Edits in the Detail View? If so, you could move the LOOKUP() to the Vendor IDโ€™s App Formula. Then the update is made in the app itself and no server side Workflow would be required.

View solution in original post

17 REPLIES 17

Steve
Platinum 4
Platinum 4

How are you editing the various columns? If all columns are being edited within a form, saving the form will capture all of the changes at once and the workflow should see them all. If, however, youโ€™re using Quick Edit, each column edited is a separate change, and your workflow will only see the change to the CONFIG_ID column. Similarly, if your edits are being made by actions, youโ€™d have to ensure you change all of the columns in a single action to ensure your workflow sees all of the changes.


So I am making the change to the config ID as a quick edit from a dropdown. Column is a ref column based on a config table and the workflow is editing the values via a edit columns action shown below

If I edit the config id(shown as โ€œVendorโ€) and donโ€™t edit invoice number then the vendor ID field updates just fine. If I edit the invoice number before the vendor ID is updated then it does not update.

This applies on your case. Each Quick Edit is a separate row update. Your workflow triggers when CONFIG_ID changes. If youโ€™ve used Quick Edit to change the other columns before changing CONFIG_ID, those changes will already be in place when your workflow is triggered by the CONFIG_ID change. If the other columns have not all been changed before CONFIG_ID is changed, the workflow will only see the updates to those that were already changed.

Note that the individual changes queued for sync do not roll up into a single update. Workflow considers each individual update separately, in the order they occurred.

So I think I follow you ? The 2 values that are being updated by the workflow are not editable via quick edit so shouldnโ€™t they still get updated?

Steve
Platinum 4
Platinum 4

Letโ€™s walk through what happens:

  1. User modifies CONFIG_ID via Quick edit.

  2. First row update with new CONFIG_ID value queued for sync.

  3. User modifies Invoice Total via Quick Edit.

  4. Second row update with new Invoice Total value queued for sync.

  5. User modifies bill date via Quick Edit.

  6. Third row update with new bill date value queued for sync.

  7. Sync occurs, sending three (3) separate updates to AppSheet: one each for CONFIG_ID, Invoice Total, and bill date.

  8. AppSheet receives three (3) updates, begins workflow processing.

  9. First update contains change to CONFIG_ID, triggering workflow. Workflow runs and completes.

  10. Second update contains change to Invoice Total but no change to CONFIG_ID so workflow is not triggered.

  11. Third update contains change to bill date but no change to CONFIG_ID so workflow is not triggered.

  12. Workflow and sync complete.

2X_c_c2458501c5c0045dca8e7ed4572b9bd9e231ede8.gif
Hereโ€™s a gif to add some better context.


Here is what our log says happens which follows your steps. But the vendor ID that should be updated by the workflow action does not change.

I am seeing in the GIF that the Vendor ID does change after the Sync? Its hard to tell the order of things in the GIF.

Is the issue that the Vendor ID is not changing automatically in the Detail view after you have changed the Vendor setting?

I have both examples in the GIF. When I change Icee Company to Waste Management, I also change the invoice number and the vendor ID stays at 4002. When I change it from Waste Management to Pepsi without changing the invoice number, the Vendor ID changes to 105.
Yes that is the issue. I am updating via a workflow and the value is not updating if 2 edits are made.
Probably shoulda made 2 gifs not back to back GIFs

So, as @Steve has pointed out, when you are making the quick edits, your Workflow will be triggered ONLY when the Vendor value is changed. As soon as you change it you can see the numeric indicator appear on the Sync button.

No other quick edits should impact the triggering of the Workflow.

Now, your Workflow calls the Action, it looks like your Action uses LOOKUP()'s to retrieve new values.

Do those LOOKUPโ€™s have any dependency on the other values you are changing?

The lookups only depend on the config ID. I can view in the logs that the workflow action triggers and โ€œSuccessโ€ is the status it gives.
I donโ€™t know if I made this one any better, the Vendor ID for Central Industries is 1024.
2X_0_050c9b5bbfb5110d945d6dfed88f594eaed22bf2.gif

Ahhh, I think I have just realized what is happening.

When you make the Quick Edits in succession, each one has the state of the row at the time of the edit - meaning they BOTH value the OLD Vendor value in the row state.

These two edits are sent to the server and processing order, at high level, would be like this:

  1. Apply first edit of Vendor value.
  2. Trigger Workflow, execute action and update to NEW Vendor ID.
  3. Apply second edit of other column with OLD Vendor ID which OVERWRITES the NEW Vendor ID,
  4. A sync occurs and simply brings back same value so app never knows about the new value.

Iโ€™ll bet, if you open your sheet (assuming you are using a sheet as a datasource), make the edit and watch the sheet closely, you will see the Vendor ID value change to the new value and immediately back to the old value.

I use a database. I was thinking that could be the caseโ€ฆsolutions?

You can watch this in the database as well, you might have to keep refreshing the table view.

Do App Formulas fire based on Quick Edits in the Detail View? If so, you could move the LOOKUP() to the Vendor IDโ€™s App Formula. Then the update is made in the app itself and no server side Workflow would be required.

I would expect so.

I donโ€™t understand the GIF at all.


Here it works properly when I donโ€™t edit the invoice number.

We shall find out as soon I can get rid of all the errors caused by adding formulas to that. I do allow for changing the vendor ID in my Config Table which I had workflows to send the changes across all current invoices but I guess Iโ€™ll just do that in database.
(Our data structure for the bulk of this system was designed by someone else so we have some quirks about where all of our used data is held and what other data is with it, itโ€™s really fun)

Yep the Vendor ID updates as soon as I change the config ID.

Top Labels in this Space