Set limit for button

actually i am created a like button in that the value of like is stored in airtable but the problem is i want like button in such a way that a user when click on like button then the show notifie you like in future when same user click on same value like then notify that you already liked it or if its a new user then the user can easily like it i hope you understand my problem

blocks (21) blocks (22) i did it like this so how to edit that to my block please explain

Try like this,

In the got cell ,use if/else block.

Get global old_likes to get values

if the get value is equal to 1
Notify - you already liked
Else if get value is equal to 0
Set global new_likes to get old_likes +1
Call spreadsheet set cell… Block (as you set above)

(If you are going to consider only 1 like mean even you no need to use maths block, simply can use number block 1)

But if someone else click on that like the value will change and that time the same user can easily click again

Show your airtable structure.

I’ve advised for same user not to click more than one at a time but your words seems to be allowing others also to like the file.
If so why do you have to use that is in the list name and email and all, directly you can use get cell block only. However without registration user can’t press like so I feel that two blocks are no need.

To overcome the problem use tinyDB.
If user press like below the file, then use this blocks, in when likes clicked

If is in the list thing file id
List call tiny DB tag
Then, call notifier to You Already liked
Else save in tinyDB tag (file id) value (clicked)

1 Like

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