How to update parameters values with byRef array return

61 views
Skip to first unread message

Andrew Makinson

unread,
Feb 7, 2017, 8:30:18 AM2/7/17
to InterSystems: Zen Community
I have the following method, I need to load the satp value into a <datacombo> parameter value - how do I go about this? using pValues does not work... 

Method LoadForm(pKey As %String, ByRef pValues As %String) As %Status
{
Set code=pKey
Set sat=""
Set satp=""

&sql(SELECT satsatp INTO :sat,:satp,
FROM Mappings_Classes.Lookups
WHERE code=:code
)
Set pValues("sat")=sat
Set pValues("satp")=satp
Quit $$$OK
}

Vlado

unread,
Feb 7, 2017, 10:12:22 AM2/7/17
to InterSystems: Zen Community
You must reload the form.

**Владо
DataCombo2DataCombo1.xml

Andrew Makinson

unread,
Feb 7, 2017, 4:03:14 PM2/7/17
to intersys...@googlegroups.com
How would I do that through a Zen method? 

--
You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
To post to this group, send email to InterSystems-ZEN@googlegroups.com
To unsubscribe from this group, send email to InterSystems-ZEN-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/InterSystems-ZEN?hl=en
Zen Community Terms and Conditions: http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions
---
You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to intersystems-zen+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vlado

unread,
Feb 8, 2017, 3:48:19 AM2/8/17
to InterSystems: Zen Community
Method ReLoadForm() As %Status [ ZenMethod ]
{
Set value=..%GetValueById("dataCombo2")
&js<zen('MyForm').reload('#(value)#');>
  Quit $$$OK
}

**Владо

On Tuesday, February 7, 2017 at 11:03:14 PM UTC+2, Andrew Makinson wrote:
How would I do that through a Zen method? 
On 7 Feb 2017 3:12 pm, "Vlado" <vili...@earthlink.net> wrote:
You must reload the form.

**Владо

On Tuesday, February 7, 2017 at 3:30:18 PM UTC+2, Andrew Makinson wrote:
I have the following method, I need to load the satp value into a <datacombo> parameter value - how do I go about this? using pValues does not work... 

Method LoadForm(pKey As %String, ByRef pValues As %String) As %Status
{
Set code=pKey
Set sat=""
Set satp=""

&sql(SELECT satsatp INTO :sat,:satp,
FROM Mappings_Classes.Lookups
WHERE code=:code
)
Set pValues("sat")=sat
Set pValues("satp")=satp
Quit $$$OK
}

--
You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
To post to this group, send email to InterSys...@googlegroups.com
To unsubscribe from this group, send email to InterSystems-Z...@googlegroups.com

For more options, visit this group at http://groups.google.com/group/InterSystems-ZEN?hl=en
Zen Community Terms and Conditions: http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions
---
You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to intersystems-z...@googlegroups.com.
DataCombo2DataCombo2.xml

Andrew Makinson

unread,
Feb 8, 2017, 8:16:45 AM2/8/17
to InterSystems: Zen Community
Hi Vllado,

The value is being reset but the parameter in the datacombo is not. How would I reset the parameter value?

databcombo is

<dataCombo label="Source Application Type :" showQuery="true"  onchange="zenPage.onChangeSAT(zenThis.getValue());sql="select code,description from Mappings_Classes.ApplicationTypes where valid='1'size="10" align="left" id="sat" name="sat" readOnly="false" required="true" /><spacer height="5" />
<dataCombo label="Source Application Name :" showQuery="true" onchange="zenPage.onChangeSAN(zenThis.getValue());clearOnLoad="true" sql="select code,name from Mappings_Classes.Applications where type=and valid='1'size="30" align="left" id="san" name="san" readOnly="false" required="true">
<parameter />
</dataCombo>

Vlado

unread,
Feb 8, 2017, 11:14:17 AM2/8/17
to InterSystems: Zen Community
Just empty partameters value('')


Do ..%SetValueById("san","")  ///reset combo value
&js<zen('san').setProperty('parameters',1,'');>         ///reset parameter value

**Владо
Reply all
Reply to author
Forward
0 new messages