Is there a way to iterate through every row in the table and change the value of boolean based on condition on click of button

Hi Guys,

I have a table where there is a column “A” , “B”,“C” which are all boolean. This table has lets say 30 rows. Each will have true or False as value in column A

On click of a button. I want it to check a condition wether column A has any true or false value and then update column B with the same value as in A. but it should happen for each row.

I know set column value happens only for particular row. Is there any workaround?

Thank you in advance for help.

Regards,
Dilip

So you consider a boolean to have 3 states: true, false and empty, and want to copy from column A to column B?

If they’re all basic columns, you can use the API, fetch all rows from that table, and use a set column method to bring the value from A to B, though I’m not sure what’s the use case for that.

Yes Correct 3 states.

Use case:

I have about 50 creators whom I Manage. Each creator has a boolean to know wether they are there with us, Meaning if they are with us the boolean is true. If not false.

This needs to be checked every time I click on button for one year that is 52 Weeks from start date

I will have Column A , Column B, Column C … let’s say till Column number 54

When on a particular day I click the button

It should check the Column A boolean value. And then check wether column B has values and if it does not have value it should set values in column B. If column B has values in it it should set values to column C.

My use case wont work for this I guess right?

Can we use API to Create a new row? where it fetches values from Table 1 and writes it into columns in Table 2 ? Would that be possible?

Or what do you suggest I do for my use case mentioned? Wouldn’t creating new row in a table with all of my creators and their values be a better approach? That way I can keep creating rows whenever I press that button.
Of course provided I can do that using API

Thank you @ThinhDinh for your response. Quite stuck with this issue.

Regards,
Dilip

Also just so that we are aligned, By API you mean Glide API ? Or Zapier?

Regards,
Dilip

Please, learn this method and adapt it to your needs

1 Like

Thank you for sharing this Himaldin :slight_smile:
Saved my day.

Regards,
Dilip

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.