Retrieving "label" values from "list" type properties

Hello,

I've been working on an email notification for ecn's and having trouble getting the "label" to return return from a list property instead of the "value".

Below is the code I've been working with and the "priority" property is the one we're interested in.

<Item type="Activity" id="${Item/ActivityId}" action="get" select="name,message"/>
<Item type="${Item/@type}" id="${Item/@id}" action="get" select="item_number,title,tpm_reasons,tpm_requested_by,description,priority"/>
<Item type="ItemType" id="${Item/@typeId}" action="get" select="label"/>


<BODY>
<p>A sales order has been changed per the information shown below.</p>
<p>ECN Number: ${Item[2]/item_number}<br/>
Title: ${Item[2]/title}<br/>
Priority: ${Item[2]/priority}<br/>
Requested By: ${Item[2]/tpm_requested_by}<br/>
Reason For Change: ${Item[2]/tpm_reasons}<br/></p>
<p>Description:<pre>${Item[2]/description}<pre/></p>
</BODY>

Parents
  • If you look at the data model, there is no relationship between a property and the list its value would have been picked from. The only place the list is tied to an item is on the UI. Once you pick the list item, it's value is stored in the property it's tied to. The propery does not know where the value came from as it's just a string field. I don't believe you can directly get the label. You have to inquire the list with the value to find the label. 

    <Item action='get' type='List'>
      <name>Priority</name>
      <Relationships>
        <Item action='get' type='Value'>
          <value>1</value>
        </Item>
       </Relationships>
    </Item>

Reply
  • If you look at the data model, there is no relationship between a property and the list its value would have been picked from. The only place the list is tied to an item is on the UI. Once you pick the list item, it's value is stored in the property it's tied to. The propery does not know where the value came from as it's just a string field. I don't believe you can directly get the label. You have to inquire the list with the value to find the label. 

    <Item action='get' type='List'>
      <name>Priority</name>
      <Relationships>
        <Item action='get' type='Value'>
          <value>1</value>
        </Item>
       </Relationships>
    </Item>

Children
No Data