Updating to airtable using Switch

Heloo Friends does any one has a clue on how to update to airtable using switch for example if a user is online or offline…? Thanks in advance

To do this you need to get the value of the current status before you can update it.
for instance, when button 1 clicks. get column, after gotten column use for each item in list to get the position of the user you want to check, for instance i want to check if position 3 of the length of list of user is online then update(Use the set cell) the index of the value in that position.

I don’t know what exactly you want to achieve by using switch to update; you can use this.
Create a global variable called switch and set it to 1,
when got column do if global switch =1 then set cell, then increment the global switch by 1, else-if global switch =2 then set cell then increment the global switch by 1 until you get to the final stage then set global switch to 1.

Hi Elisha based on your explanation is it something close to this…?
blocks (7)

This is entirely wrong

I stand to be guided please

Can i see your entire blocks

blocks(2)

I think what you’re trying to do is that if a user clicks on the switch you want that particular user data in the database to be updated to Online and when the user turn off the switch you want the users data to be changed to Off am i right?

Exactly You have just hit the nail on the head

Then that should solve your problem. Instead of using Row ID can’t you use values (Suggestion) ?

Hii i have tried the above blocks but on trying it says the app has unfortunately stopped working am not sure if i did it wrong but i still stand to be guided

Kindly explain more on this please

Am already on my bed :new_moon:, maybe tomorrow.

1 Like