Question Mark O'Reilly · Jun 26, 2020

Ens Director GetItemSettingValue not picking up system default

We have code with the line 

Set archiveFilePath=##class(Ens.Director).GetItemSettingValue("ReadPDFFileService","Adapter","ArchivePath",.status)

When we have this archivePath set as a System Default setting rather than Production definition setting i.e. shows in blue rather than black in the restore default screen it doesn't get the setting value. We want to get this value nomatter what way it is set. 

Running 2016 Healthshare

Comments

Eduard Lebedyuk · Jun 26, 2020

Curenlty active setting value (so System Default Setting in your case) should be returned.

I was unable to reproduce the issue on Cache for Windows (x86-64) 2016.1.4 (Build 104_6U) Wed May 22 2019 12:23:59 EDT.

Have you updated your production?

Check that your production definition does not contain old settings.

0
Jeffrey Drumm · Jun 26, 2020

GetAdapterSettingValue() may give you what you want. The Type parameter isn't needed.

Set archiveFilePath=##class(Ens.Director).GetAdapterSettingValue("ReadPDFFileService","ArchivePath",.status)
 

There's a corresponding GetHostSettingValue() method for non-adapter settings that works similarly.

Both seem to supply the System Default Setting when the setting is unvalued in the production.

0
Mark O'Reilly  Jun 29, 2020 to Jeffrey Drumm

Thanks the GetHostSettingValue() from your answer does work. I thought i tested both before replying previously. 

Set archiveFilePath=##class(Ens.Director).GetHostSettingValue("ReadPDFFileService","ArchivePath",.status)w archiveFilePath
\\penn-data\archived_letters$\

0
Mark O'Reilly · Jun 26, 2020

Neither option seem to work. We hope to within the next few months get up to date with our healthshare environment. 

Nothing in the Production def left over 

When try the set and write for either line of code when on default returns nothing 

When i change it off default it works- but as this changes between environments want to be keeping this as a system defualt

0
Jeffrey Drumm  Jun 26, 2020 to Mark O'Reilly

Did you try GetHostSettingValue()?  I'm working with 2018.1.2, but I'd be surprised if the API changed.

0