Question
Michel Liberado · Feb 12, 2020

How can we set the displayed label of a SETTING in the portal ?

Hi,

I need to set the label of a custom setting in the portal instead of the name of the associated property, eg.:

Class SomeClass Extends (Ens.BusinessService, %ZEN.Portal.ContextSearch)

{

Property ABadPropertyNameToChange As %Boolean;

Parameter SETTINGS = "ABadPropertyNameToChange:CustomSettingsSection"
}

will result in this in the portal

-------------------------------
CustomSettingsSection

ABadPropertyNameToChange

[ ]

It has to be possible because of you look at the Basic settings of a Business Service (just an example), there is a setting named "Call Interval" and I doubt that the associated property has a blank space in its name. 

SETTINGS documentation: https://docs.intersystems.com/irisforhealth20194/csp/docbook/Doc.View.cls?KEY=EGDV_prog#EGDV_prog_settings_options
 

10
1 3 103 2

Replies

Ensemble uses $$$GetLocalizedName macro to get localized settings names.

You can add caption directly:

set ^CacheMsg("EnsColumns","en-us","HelloWorld")="Hello World"

Where HelloWorld is a property name, value is a caption and en-us is a session language.

It should work like this:

ClassMethod Add()
{
    quit $$$Text("@HelloWorld@Hello World", "EnsColumns", "en-us")
}

but for me it doesn't set the global. Not sure why.

If it is desirable to have the customized setting heading with distinct separate words (like in the HL7FTPService) in the production configuration view then the global CacheMsg should be updated in the related namespace (e.g. Ensemble) where the production will be running as it is shown below for the RemoteArchivePath:

  Ensemble>set ^CacheMsg("EnsColumns","en","RemoteArchivePath")="Remote Archive Path"

After that change the RemoteArchivePath setting name is shown in the view as ‘Remote Archive Path’.

The following post (How to - Customize Ensemble Settings) details your answers.
I had not seen it while searching for answers because it didn't show up in the results while typing "settings" in the search field it but it does when typing "customize":

 vs 

Anyway, thank you for your help.