How to populate a select component form within Web Services

Document ID : KB000111882
Last Modified Date : 22/08/2018
Show Technical Document Details
Introduction:
In the form designer, you can add >1 options into a select component. 
And this then shows in the SC-UI when you open a new request for the option with that form. 
When you open a request in the SC-UI itself, you can then open the dropdown and select one option form the list. 

However in webservices, you can set/select ONLY ONE option, right? 
There is no dropdown 'visible' in the web services, right? 
So in web services, you have to know the list of options(as shown in the UI) and Select&Set ONE accordingly. 
Question:
How to populate a dropdown/select component form within Web Services

When creating a request trough Web Services, you need to populate a select component.
How to set this form-field with a proper value?
 
Environment:
Windows, running CA Service Catalog.
Answer:
This is accomplished with the code-setting as shown here:
<formValuesData xsi:type="xsd:string">offering_id:10180|rate_plan_id:10157|item_id:12498|date_1:08/22/2018 18:13:00|sel_1:Option1~Option1</formValuesData> 

Where 'sel_1' is the _id of the field on the form. 
And 'sel_1:Option1~Option1' then populates that field to the desired option. 

Please see the below example:
-----------------------------
To add (only) one option in the select component of a form, the below soapUI works: 
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.soap.usm.ca.com"> 
<soapenv:Header/> 
<soapenv:Body> 
<ser:addRequestWithForm soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> 
<sessionID xsi:type="xsd:string">ade9fcf3-08d5-4519-8632-7591c45a4503</sessionID> 
<requestData xsi:type="xsd:string">name:6-TextAreaNewLine!req_by_user_id:spadmin!req_for_user_id:spadmin!priority:3</requestData> 
<requestValuesData xsi:type="xsd:string">project:ProjectCase1171550</requestValuesData> 
<requestValuesDataType xsi:type="xsd:string"></requestValuesDataType> 
<addedOfferings xsi:type="xsd:string"></addedOfferings> 
<addedItems xsi:type="xsd:string">offering_id:10180|rate_plan_id:10157|item_id:12498</addedItems> 
<formValuesData xsi:type="xsd:string">offering_id:10180|rate_plan_id:10157|item_id:12498|date_1:08/22/2018 18:13:00|sel_1:Option1~Option1</formValuesData> 
</ser:addRequestWithForm> 
</soapenv:Body> 
</soapenv:Envelope>