Question about bulk action and workflow

I have a bulk action to modify multiple rows (sets a column value to TRUE) and a workflow that fires if ANY row has TRUE in that column.

My question is when will the workflow fire?

  1. AFTER the first row’s column is changed
  2. AFTER ALL the rows’ column are changed
  3. EVERY TIME any row’s column is changed

@Phil?

To the best of my knowledge, a workflow fires (subject to its conditions) for each row when that row’s update is received, so (3).

If so, how can I realize #2 (AFTER the last row’s column changes)?

I can imagine several approaches:

  1. Don’t use a workflow. Instead, use another app-side action.

  2. Somehow mark the last row of the batch and have the workflow trigger on that.

  3. Instead of TRUE, set the column to 1.0 divided by the count of rows, then trigger the workflow when the sum of that row reaches or exceeds 1.0.

Consider, too, the possibility that the sync of the rows might be interrupted by delay, or that two batches may be synced at the same time. This inspires another possibility:

  1. Instead of setting the column to TRUE, set only one row’s column to a list of the rows in the batch. Then only one row to sync and the full batch is transmitted at once.

Thanks Steve - your #4 will work for me.

1 Like

@Steve, I am still stuck with this implementation.

I have double grouping in the table view and the bulk action does not appear in the top level group - I have to descend one level down before I can select the bulk action.

However, I want to be able to select rows regardless of the top level grouping. How can I do this?
Is this a feature request already?

Thanks,
Jayaram

1 Like

Oooooh… Lemme think on that…

Can you give me a sense of why all of the selected rows need to be handled as a batch? That may suggest an alternative.

It’s a client’s inspection app and the workers complete inspections daily - the supervisor needs to be able to download all the completed inspections for the day as a CSV file (I have made an action button for that - easy).

As an additional feature, the client also wants the ability to select any rows and delete them but also make a backup of the deleted rows as a CSV file in Gdrive. I have a script (invoked via a webhook workflow) that does the backup and deletion.

For my action/workflow combo to work, I think I am going to propose that the supervisor gets a different view (currently the supervisor sees the same grouped view as the workers) with a single grouping or no grouping so that the bulk action shows up.

1 Like