Automations: clearing a Boolean field

Are you using our SaaS platform (Baserow.io) or self-hosting Baserow?

SaaS

What do you need help with?

So I have a Boolean field called “Stock Checked” this field gets ticked once the specific info in the row has been confirmed. Easy. But now every Monday, I need to clear the “Stock Checked” field for the admin team to do it all over again during the new week. There is about 650 rows to clear every Monday morning. I was trying to do an automation but it seems like its not working. Not too sure what I am doing wrong.

the automation route i had was as follow:
start with periodic trigger
there after an Iterator
update row.

with everything set up like it should. i come to find that it has not cleared my boolean field.

Hello @Rickus3126,

I was trying to do an automation but it seems like its not working. Not too sure what I am doing wrong.

Would you mind screenshottting your workflow, the iterator and update row forms? It’ll provide some context to debug this further.

Cheers,

Peter Evans

Hi, setting the value to False should clear the Boolean field

in List Rows, i’ve put a filter on to filter the field with the checked boolean. from there Iterate on items and update the Clear Test fiels from true to false.

i have set it up as per your example. For the test i did a clear every 15min. however it did not work.

Thanks @Rickus3126, can you screenshot the forms themselves in automation? We could do with seeing how iterateand update row are configured.

Cheers,

Peter

Infact. it is creating new rows at the bottom every time it runs.

This is probably because the Row ID of the record that needs to be updated is not set correctly

its not a single row that needs to update. its about 650 in total

Hi @Rickus3126, I think I see the problem.

  • Iterate on items: you’re selecting the Clear Test field. Please change this to Previous node > then click the “select” next to “List rows in Main Contracts File”. This means we’ll loop over each row. Right now you’re iterating on each boolean field.
  • Update a row: in your ID field at the moment you’re trying to pass an ID, but you’re actually passing the boolean field itself. Once the iterate part is fixed, you can select Current iteration > Iterate on items > ID.

Now, we’ll iterate over those rows, and update Clear Test to “false”.

Cheers,

Peter

I followed your steps and got this error at update a row

Value error for “row_id”: The value must be an integer or convertible to an integer.

Thanks @Rickus3126,

And just to confirm: you changed the Iterate on items source?

Could you screenshot the output of the Iterate on items? Like this:

Cheers,

Peter

Thanks @Rickus3126,

I think something else is going on, and screenshots might not get us there quickly! Would you mind exporting this application & database, clicking “Export structure only” (this won’t share any sensitive data with me, just the structure of the applications) and sending it to me as a direct message? You should be able to by going to my profile page.

Cheers,

Peter

Thanks for the export @Rickus3126! I can confirm things are working correctly. Two things to note:

  1. “Update a row” definitely needs to have a row ID of: Current iterationIterate on itemsItemid. This ensures that when you loop over your rows, Baserow is updating the correct row.

  1. The reason why you saw that error (about row_id not being numeric) is because the nodes above it had stale test data. If substantial changes are made to the nodes above, you need to click “test event” again to make sure each node has the correct test data to work with.

I tested these changes by:

  1. Showing your hidden field in the table, and checking the checkbox in a few rows
  2. Updating that row_id in automation so that it used Itemid
  3. Clicking “Start test run”

My rows all have an unchecked boolean field now :tada:

Thank you for sharing the export, I hope the above works for you.

Cheers,

Peter