Update user collection properties from action button ( field to update a relation field )

I try to update user collection properties which is relation properties

user only one usertypers
usertypes has many users

when user click this button, his userTypes will automatically change to Basic or Pro (will use another button )…

what im doing is… when button click, its action will

update at user collection list field usertype will wirte Basic

and at userTypes collection, user will forward into Basic row…

but this not working

Hello, i didn’t get your full idea, but as i understand ; each user has one usertype and each usertype can have many users. So in order to update a user’s usertype you should add an action which is (Update logged in user) and then choose which usertype should this user be (basic or pro). It’s maybe not working in the last picture you sent because the usetype you selected is the same one as the logged in user’s usertype, so nothing has been changed.

1 Like

Thank you for your reply…

what i’m doing is… for “basic user” they can only click the button one time in a day, and for pro user, they can click let say 5 times in a day… i think …

my plan is the button will not be visible when user countClick < 1 … and still will be visible for pro user which countClick < 5 … until they reach countClick 5 …

im still thinking how to put user into this userType relation…

**my plan mybe next time want to raise limit 5 to 10 or etc… easy to edit limit for each userType

Hi @lochoe,

Welcome to the community :partying_face:

What you are doing currently is updating that user property again with that user property.

What you need to do is make that button a list ( three dots > make list ) and filter it for basic plan row ( like Name > is equal to > Basic or contains > basic ) and add 1 on the maximum number of items section. Then go to the Components section in that list and click the button and add the Update Logged in user action that add current usertype to the UserType field.

Thank you

1 Like

thank you for your suggestion, i will try work around that…

I tried this way… first I put list of userTypes with 3 button …
the list is based on limit > userClick for login user, if userClick = limit the button should not be appear

(each button will appear only for each usertype name)
userType right now… empty, basic and pro

and then everyday need to reset userClick row to zero back… dont know if this the right way to do this… but though i work for me now…

for each button will update userClick, except for normal button (will update user userType into Basic)

for other button

maybe messy solution, hope have better solution…

now looking way how to auto reset userClick row to zero daily…

ops sorry above solution not working…

Video:
Limit User Click based on User Type Limitation Adalo

I make this way to limit user click based on user type…

in this system there are 3 user types
eg: normal, basic, pro…i add super one more

on user database, I add row userType and userClicks…

and add userTypes collection which namely according to the type we will refering too… with each one has their own limit

on the screen i make userTypes list which will have button only… and filter with userTypes’s name (collection) equal to user/userType (collection) and maximum only 1 will appear and sort it low to high (limit)

each have 3 buttons (which work differently when click)

1st button only appear when userTypes/limit = userClick (this button have no action anything, maybe will add modal screen

2nd button only appear when userTypes is empty from (first button user will see anyway) have action update user/userTypes and userClick + 1

3rd button only appear when userTypes less than logged in userClick limit. with action to update userClick+1 (this button will keep appear until user limit reach)

This work for me right now,…if any better idea…

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