Hi!
did you find any information about your ask?
- Log in to post comments
Hi!
did you find any information about your ask?
Hello,
I need to access the value of a setting I created (ex: name_BO) within the logic of my BP.
Property name_BO As %String(MAXLEN = "");
/// Additional Settings
Parameter SETTINGS = "name_BO:Basic:selector?context={Ens.ContextSearch/ProductionItems?targets=1&productionName=@productionId}";
But the name of the class is common and the production item will change its name.
Example:
Class name: My.BP.Common
Items in the production:
Item 1: My.BP.AA
Item 2: My.BP.BB
Where My.BP.AA and My.BP.BB are My.BP.Common class but have a setting value (name_BO) different.
I need that in the logic of my My.BP.Common get the value of "name_BO"
Can you help me?
Thanks!!
You mean the comment:
if ##class(Ens.Config.Item).NameExists("UT.Client.GPK.Production","RS.Transformation",.id)
{
set item=##class(Ens.Config.Item).%OpenId(id) write item.PoolSize
}
But what the input values mean?
I have not found the function (NameExists) in the documentation
http://docs.intersystems.com/latest/csp/docbook/%25CSP.Documatic.cls?PA…
Thanks again!
I think I'm not fully understanding...
The logic is in the class "My.BP.Common"
Therefore, that class does not know the name of the item in production, because those items that use the class "My.BP.Common" will be created later.
For this reason a new parameter has been created in the basic configurations of the BP, using:
Property name_BO As %String(MAXLEN = "");
/// Additional Settings
Parameter SETTINGS = "name_BO:Basic:selector?context={Ens.ContextSearch/ProductionItems?targets=1&productionName=@productionId}";
I want to obtain the value of this new parameter and use it in the class "My.BP.Common", regardless of the name i have in the production.
Is this possible?
Using
set tSC=##class(EnsPortal.Utils).ItemSettings("Production.Name||Item.Name",.settings,.colNames)OR
set tSC=##class(EnsPortal.Utils).ItemSettings("Production.Name||Item.Name",.settings,.colNames)I need to know the name in production
If I get the current host name from inside of it, then I can use this name to acces of the value of setting
set a = process.%ConfigName
write ##class(Ens.Director).GetItemSettingValue(a,"Host","Name_BO",.status)