Registering a user and creating the different blocks tied to page data is relatively easy with codeless, but I’m struggling with the “update user” block and particularly using the “Get Current Geo Location” block to generate location data which is then deposited back in the correct Users table column… The goal is to allow the user to use the Device API “Get Current Geo Location” to update their registration with a primary location. I’ve added a “Primary_Location” column in the Users Table, but I can’t find much documentation on how to use the “Update User” block to add data to a given column. Suggestions on how to do this with codeless would be appreciated.
Hello @Frank_Piotrkowski
I added the Primary_Location field with the Point type to the Users table.
Next, I created the updateUser
method, which takes two parameters, userID
and its location
in the format Any Object
:
Added the following logic:
- Take a user and put him in a variable
- Change his property Set Property in block
- Make an update Update User block
Execute the request by passing the user objectId and its location in Point format: