You are currently viewing What is “gs.getProperty” – Where is this value coming from?

What is “gs.getProperty” – Where is this value coming from?

Question?

I’ve inherited a script that has this line in it –
approversList.push(gs.getProperty(‘mycompanyname.other.approver’)+””);
I’m trying to figure out where it’s pulling the value of mycompanyname.other.approver from.
Can anyone help?

What are system Properties?

System properties are used to control the system’s behaviour. System properties are maintained in the System Property table [sys_properties]. You can access this table via the module navigator, or directly typing sys_properties.list in the Navigator Filter.

What are the things we should know before using system properties?

  • System properties store configuration information that rarely or never changes.
  • Each time you change or add a system property, the system flushes the cache to keep all nodes in the cluster in sync.
  • This cache flush might cause temporary performance issues to the instance if done excessively.
  • As an alternative to a system property to store configuration information that changes more than once or twice a month, you can use instead a custom table to store regularly changing configuration information.
  • Define and use a naming convention that makes the property easy to manage. This allows users to filter custom properties from the hundreds in the system properties list.

What are the advantages of system properties?

Using system properties instead of hard-coded values. To save time and maintenance, instead of using hard-coded values in a script, you can use system property and whenever need to change the values just change the value in the property and the change will be reflected in all the places.

How to call system property in scripts?

You can use gs.getProperty(‘property name’). It is a server-side way to get the value stored in a system property.

E.g. gs.getProperty(‘mycompanyname.other.approver’)

How to create a Properties page to display properties?

The Properties page gives easy access to all of the properties in one place. To display properties, create a new module under the appropriate application menu.

  1. Right-click the application and select Edit Application Menu.
  2. In the modules-related list, click New.
  3. In the Title field, enter Properties.
  4. In the Link type field, select URL (from Arguments).
  5. In the Roles field, select admin.
  6. In Order, use the number where this should appear on the application menu.
  7. Click the image icon.
  8. Select the Properties icon.
  9. For Arguments, use the system properties UI page.
  10. Submit

The property page now appears in the application menu.

end footer

Leave a Reply