Home > WebEOC > Admin Guide > Board Building Tips > Capture the Username or Positionname

Capture the Username or Positionname

Table of contents

Username

The following code grabs the username from the XML if the record is new:

<if test="not(/data/node()[@dataid])"><input type="text" size="20" name="originating_user"><attribute name="value">
<value-of select='/data/@username'/></attribute></input></if>

To achieve the same action, but when the record is an existing or updated record, use the following:

<if test="(/data/node()[@dataid])"><input type="text" size="20" name="updating_user"><attribute name="value"><value-of select='/data/@username'/>
</attribute></input></if>

Positionname

Similarly, the following codes grabs the positionname from the XML if the record is new:

<if test="not(/data/node()[@dataid])"><input type="text" size="20" name="originating_position"><attribute name="value"><value-of select='/data/@positionname'/>
</attribute></input></if>

If the record exists or was updated, to grab the positionname from the XML, use the following:

<if test="(/data/node()[@dataid])"><input type="text" size="20" name="updating_position"><attribute name="value"><value-of select='/data/@positionname'/>
</attribute></input></if>
You must to post a comment.
Last modified

Tags

Classifications

This page has no classifications.