Bot Process (Action) is updating columns it is not meant to

I have an app that tracks deliveries to my business. When we get new deliveries the following 3 steps need to be completed:

  1. Mark off the delivery (count the items in the delivery)
  2. Put away the delivery (delivery items to be put in the correct storage location)
  3. Receive into inventory system

I have a YN flag and form associated with each step, I also have a DateTime field (DTS - date time stamp) for each step which I use NOW() when they complete the form. This all works fine

I have a Bot with an event that is triggered when all 3 steps flags are set to Y (completed) and then a process (which is an action) to set a column ‘Complete DTS’ to NOW(). What is happening is that when this action is performed it is overwritting the DateTime of the 3 previous steps to to NOW() (same DateTime as the ‘Complete DTS’ column)

Eg. As we go through the delivery steps
Mark off DTS - 01/01/2021 12:00:00
Put Away DTS - 01/01/2021 12:05:00

I complete the final step and watch the Google Sheets and Received Inventory DTS is updated correctly, let say for this example

Received Inventory - 01/012021 12:10:00

As I watch the Google Sheets file I can see the data being written to the 3 steps DTS field and 2-3 seconds after Received Inventory DTS is updated the Complete DTS is updated to 01/01/2021 12:10:02.

2 seconds later all the above fields are set to the same as Completed DTS.

Mark off DTS - 01/01/2021 12:10:02
Put Away DTS - 01/01/2021 12:10:02
Received Inventory - 01/01/2021 12:10:02
Complete DTS - 01/01/2021 12:10:02

Cannot understand why this is happening, Complete DTS should update but the other 3 DTS fields should not change.

I have been trying to debug this for a few days now, can anyone shed some light on this ?

Did you say you are updating those 3 fields from the same form?

Does the user open the form and tick the first box…leave the form open, do some work and then come back and tick the second box…repeat for the 3rd box? Or do they open the same form 3 times after each step?

Check the edit setting of each of your Y/N fields and make sure they’re not set to Reset the value of this field if the row is edited section.

It’s 3 separate forms. There is a Mark Off form, a Put away form and a Receive Inventory form. Each for is saved at each stage.

Reset on edit is not set.

Not sure if im on the right lines here. But if a bot updates a row then all initial value formulas and App formulas are automatically updated. Even if your action doesn’t reference them.

Thats what is happening exactly, i suspected that but can’t understand why ?

Is this documented or a known issue ? or are you suspecting this to be the case ?

If I set the 3 fields Mark Off DTS, Put Away DTS and Received Inventory DTS with the App Formula to something like IFS(CONTEXT(“View”)=“Mark Off_Form”, NOW()) so that it will only set the field to NOW() only on the form associated form view only. The Bot fails and I get the following error:

Can anyone suggest a workaround ?

Looks like your running an action called “Complete Action” on a table called “BP Delivery Register” and its complaining because [MO DTS] is blank (or mybe being set to blank) when it is a required item.

Cant help further than that :confused:

Suggest you look at the key column in the spreadsheet to try and it work out

As the Bot action rewitres all fields regardless whether you reference it or not, the CONTEXT(“View”) is not satisfied so it just doesn’t just ignore it but it overwrites it will blank or null but that field is a required field hence the error.

As @1minManager points out, if the fields are set as “required”, the expression you noted above prevents a value from being set violating the “required” setting.

The simplest way to resolve is to ALSO implement a Required_If expression making the value only required on the desired form it should be set on.

1 Like