Get Data from XML (user selection from SRC)

Hello.

How can i get in script value in "option label" wich relate to "select" (value that user selected)

For example:

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<form><text readonly="false" multiline="false" label="Please select path" id="path">C:/Temp</text>
<select readonly="false" style="radio" label="Access right" id="ReadWrite">2<option label="Only read">1</option><option label="Read-Write">2</option></select>

Red font - the value that the user selected.

 

In that case user select "2", how can i get data that corresponding to this choice - "Read-Write"

------------

as this section: 

<option label="Only read">1</option><option label="Read-Write">2</option>

describes the xml versions of the user's choice.

  • I have an SRC field name: NameofApplication which I needed to be extracted from user selection of SRC to be use in the related Change record field:  affected.item

    1. I defined the expression in Catalog connector

    Service Catalog> Administration> Tailoring >Catalog Connectors> Open a Change

    This uses the script name: xmlFill.getValue

    if (filename($L.file)="cm3r" and svcCatalogId in $L.cartItem="2787") then (affected.item in $L.file=jscall("xmlFill.getValue", svc.options in $L.file, "NameofApplication"))

    2. Once a ticket is raised from SRC Catalog and will have auto-related Change record, the field is auto-filled with the value selected from User Selection n SRC

  • We use SRC on request.

    And now on FORM (OCMQ or OCML) there is an element - 'dynamic form' with input 'svc.options'

    This form display the user selection as it user saw it in catalog

    SRC_svc_001.jpg

    And when you setup it in user selection it looks like:

    SRC_svc_002.jpg

    How can i get this Label from XML and not a value (wich marked on second csreen) bcuz xml contains VALUE selected by user (not a label)?