In this topic, we’ll look at how easy it is to make retrieving data for a logged in user in UI Builder.
In this example we format text and other elements for a logged in user within a form based on Boolean values in a database table. If the logged in user’s stage1Complete value in the UserDetails table is true, set the text to ‘XYZ’ else set text to ‘ABC’
Structure
For example, the page has a login and password entry field, a button and a text.
For authorization use emails
login admin@mail.com
password 123456
or
login test@mail.com
password 123456
We also have 2 already created accounts in the Users table, and the related records in the UserDetails table
Logic
Let’s add logic on button click. For this we need click on the puzzle:
On click event write logic like this:
That’s all!
Thanks for reading, and as always, happy codeless coding!