I notice that often we reference the icon for a given business object in multiple places, in page properties (side nav icon), in buttons, etc.
Is the right thing to do here to define variables in the project Environment Variables section for things like this, or somewhere else?
Environment variables are used for things that will change by runtime environments. A good example are credentials to access the appâs databases. These would be different in each environment. You can read more about these here: Environment Variable.
If you are trying to parametrize client-side details (icon name in your example) that wonât change without distributing new code, you could use project parameters. They are normally used to configure content in a library (you can read more here: Parameter Values. In your case, you could try adding a new project parameter and specifying a default value (âfactIconâ with a default of âdoneâ for example). Then you can put âPROJECT_PARAMETERS.factIconâ any place you would use âdoneâ. The generate code will replace âPROJECT_PARAMETERS.optionsOptionalityâ with âdoneâ in your generated code.
1 Like
with an icon defined as a project parameter, am trying to define it in the settings for a UI page.
but in the settings âsidenav icon nameâ for the UI page, it doesnât show the right icon using:
PROJECT_PARAMETERS.placeIcon
Also tried putting {{ }} around it, with no luck.
Is there another syntax needed?
And, in this specific UI, it shows the icon dynamically to the right of the definition (along with an option to use outlined if available), I assume the project parameters are not evaluated dynamically, so I shouldnât expect the image to show once I get the right syntax, right?