dashjoin / platform

Dashjoin Is an Open Source & Cloud Native Low Code Development and Integration Platform that helps teams deliver applications faster 🚀 Uses a data-driven approach inspired by Linked Data to make use of your existing assets
https://dashjoin.com
GNU Affero General Public License v3.0
89 stars 7 forks source link

"Dynamic" Homepage for users (Expressions in Homepage property) #367

Closed pgrill79 closed 1 week ago

pgrill79 commented 3 weeks ago

With the properties in the tenant users i can set a homepage for every tenantuser (or role). But in our case, every user is also a record in the client table, and i want that the homepage of the user is its record page in the database:

E.g.: wooltest.automateit.ch/wooltest/client/

So i would need to set a expression in the homepage property field, which gets me the GUID (which is the primary key) for a username, and set this as Homepage property.

aeberhart commented 3 weeks ago

You can already do this by using on-login and setVariable:

This example loads a record from the DB and uses a value in there to set the "homepage" variable:

{
    "ID": "on-login",
    "string": "$setVariable(\"homepage\", \"/page/\" & $read(\"sqlite\", \"REQUESTS\", 6).name)"
}
aeberhart commented 3 weeks ago

Please close the issue if this solution works for you

pgrill79 commented 1 week ago

The proposed solution works. Thanks