How to change the Address in InterSystems Trakcare for Objectscript
Hello my friends,
I have a problem with Objectscript, why the value of address become like this ?
.png)
everything works fine except the Address,
this is my code, do I need something to make this into real address ? should I put something in my code ?
set paper=obj.PAADMPAPMIDR.PAPMIPAPERDR
if '$isobject(paper) continue
set Address=paper.PAPERStName
thank you for your help
Best Regards,
Steven Henry
Comments
Hi Steven
This property is showing as a Collection property, so it needs to be unpacked to be read as text.
The documentation on processing List properties is available at: https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cl…
I just put GetAt(1) and it works
this is the correction that I've been made :
set Address=paper.PAPERStName.GetAt(1)
From a performance aspect i would not use objects to retrieve the data, but use SQL.
SQL will take care of the conversion for you.
e.g.
select PAADM_PAPMI_DR->PAPMI_PAPER_DR->PAPER_StName
from SQLUSer.PA_Adm
where
PAADM_Hospital_DR = 2and
PAADM_AdmDate>='19/03/2025'and
PAADM_AdmDate<='19/03/2025'