Reading config parameters from Angular web portal

Hello group,

We have created a new tile in the Web Portal home page, and among other things we want to add a link inside this new tile with a specific URL.

The thing is that this URL could change in the future and to avoid a new build and transport to the different environments, we would like to add a config param in the designer that stores the url.

Now, How can be a config param be read from the angular Web Portal?

Any code snipped, showing how to do it would be much appreciated. ;)

Thanks in advance.

David 

  • Hi, David,

    There are several ways to achieve this. You can create a custom api endpoint to run a script or a stored sql sentence that returns your config param. 

    Also, I dont know if there's a specific api endpoint for config params, but in v93 where I've tried, you can read dbobjects with their uid , given that you have read permissions on them.

    So:

    1. Create your config param in Designer.
    2. Right click on it and find its UID
    3. Give read permissions to your portal users on the DialogConfigParm table and the UID_ConfigParm and Value columns
    4. After that you can issue a get <Apiserver>/portal/dbobject/DialogConfigParm/<uid of the param> and you'll get the Value.

    HtH!