AnsweredAssumed Answered

Retrieving an array in pdm_list response

Question asked by Ashfaquddin on Jul 29, 2015
Latest reply on Jul 31, 2015 by William Teixeira

Hi Team,

I am trying to retrieve the task status of a specific task on detail_wf,htmpl so that I can write a pdm_if condition that will enable edit button on task detail page when the task status of a specific task is set to approve.

For this I am trying to get the change orders that have this task and their statuses and store them so that I can check them in the pdm_if,

What I wrote is:

var wfstatus;

var chgref;

<PDM_LIST PREFIX=work FACTORY=wf WHERE= "wf_template='400323'">

wfstatus="$work.status";

chgref="$work.chg";

</PDM_LIST>

alert(wfstatus);

alert(chgref);

 

I am getting undefined for wfstatus and chgref because I have multiple values returned for this query.

How do I store an array and return those values in pdm_list?

 

Also, can I write a where clause: WHERE= "wf_template='400323'" AND chg= '$args.chg'" in the where clause so that it gets the status of this particular task. I tried this but it doesn't work.

 

What works is:

<PDM_LIST PREFIX=work FACTORY=wf WHERE= "persistent_id='wf:577184'">

wfstatus="$work.status";

chgref="$work.chg";

</PDM_LIST>

alert(wfstatus);

alert(chgref);

 

Any help in this regards would be highly appreciated.

Outcomes