Plasmic Cloud Update error

Hi Team, I’m using Plasmic Cloud and configured the User Properties to use my users table. But when I’m trying to make an update operation using the primary key (user_id), I suddenly got this error. Am I doing something wrong?

Hi, you aren’t allowed to reference currentUser unless it is of the form currentUser.something in a dynamic value

Hi @yang :wave: I’m trying to update an attribute from my own users table and it is using user_id as the pk. So it is in the form of currentUser.userProperties.user_id…

@tasteful_possum Got it… Can you share screenshots showing exactly what your update query looks like?

Hello @yang, This is how it looks…

I was just trying to update the has_onboarded field using the current user’s user_id from the extended / configured user properties using my own user table.

Also I’m not sure why the result/preview is showing 2 user_id’s…

Hmm, that does seem odd why it’s not allowed, CC @fmota!

Hi Joey, sorry for the issue, a fix is going to be pushed soon, I will ping you once it’s out

Thanks @yang & @fmota :pray:

Hi Joey, you should now be able to set the operation

Wow! Thanks @fmota ! Will check this out and keep you posted.

Curious question, what is the difference of having a custom user config vs a query that does the same thing?

Is there any advantage on having a custom user config setup?

The workaround I did was to setup a query that also gets the current user’s info from my table and it seems to work.

But I’m curious if there’s any difference…

Good question, you could also add a query to all your pages and components to fetch the same data, so on one level it provides some convenience instead of requiring you to add this query everywhere

Additionally it enables some new security guarantees, where you can make secure use of currentuser.customproperties inside of your queries. More on this in the data integrations security doc

Ah yeah I see the benefit now. Thanks @yang ! Does the data on custom user config always in sync with the database? ie. If I update the has_onboarded in my user table, will the custom user config (that is connected to my user table) pick up the change?

It’s just a query that runs on each page load

So it might not sync as there’s no page load that happened…

It will only pick up the change when there’s a page load…