I think the function you might be looking for may be:
The return values are: Indeterminate, Not Member, Failover, Async, Disaster Recovery, Read-Only Reporting or Read-Write Reporting.
You can also get a lot more info than just if it's a primary or not from:
Hope this helps!
Would this section of documentation help with your situation?
(I'm aware this is from the latest documentation online, but I did confirm that this section also exists in my HealthShare 2017.2 version as well.)
That section appears to basically describe how to save the JSON to a temporary file on the filesystem, then re-open the file as an Object and access the key successfully without hitting <MAXSTRING>. Yes, I'm aware that does cause extra storage I/O, so for busy servers this could have a negative impact on I/O performance.
It looks like they also offer a possible solution changing the JSON entity to a %Stream.GlobalCharacter which can handle strings much larger than <MAXSTRING> which may help with not adding nearly so much storage I/O as the solution in the previous paragraph.
43, if you have to read in the variable. -4 if it's assumed to already be there. +4 if you need to see a carriage return between the input and the output:
R Z F I=1:1:$L(Z) S J=$E(Z,I) F K=1:1:J W J
Here's the '-4' code if you assume the Z variable has the initial integers:
F I=1:1:$L(Z) S J=$E(Z,I) F K=1:1:J W J
And, here's the +4 code to add the carriage return between input & output:
R Z W ! F I=1:1:$L(Z) S J=$E(Z,I) F K=1:1:J W J
[edited to add other cases.]
Log in or create a new account to continue