Hybrid Integration 10.2 | Integrating On-Premises Applications | Document Conventions | Creating Client Code | Building a Browser-Based Client | How Input Values are Passed to the Service the Browser-Based Client Invokes | When Browser-Based Clients Pass Multiple Values for the Same Input Variable
 
When Browser-Based Clients Pass Multiple Values for the Same Input Variable
When Integration Server receives multiple input values that are associated with the same variable name, the String variable in the IData object will contain only the value of the first variable. The String list variable will contain all the values. For example, the following shows a URL that contains two values for the variable year and the resulting IData object that Integration Server creates:
/invoke/sample.webPageDemo/checkYears?year=1998&year=1999
Key
Value
Data Type
year
1998
String
yearList
1998
String list
1999
Similarly, if the HTML form contains two fields with the same name and a user supplies values for more than one, the String variable in the IData object contains only the value of the first variable; the String list variable contains all values. For example, the following shows sample HTML code that renders check boxes:
<INPUT TYPE="checkbox" NAME="Color" VALUE="blue">Blue<BR>
<INPUT TYPE="checkbox" NAME="Color" VALUE="green">Green<BR>
<INPUT TYPE="checkbox" NAME="Color" VALUE="red">Red<BR>
If the browser user selects all check boxes, the document that is posted to Integration Server will contain three values for the variable named Color. The following shows the IData object that the server passes to the service:
Key
Value
Data Type
Color
blue
String
ColorList
blue
String list
green
red

Copyright © 2015- 2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release