In this post I want to talk about valid and invalid ways of sending API calls with the parameter values for In / In No Paren types. If you are sending parameter values for the IN / IN NO PARENTHESIS parameter type, you will need to use pipes ( | ) to escape out each value if any of your data has a comma in it.
Example Data WITHOUT comma: "ABC, DEF, BridgeWorks VDM"
Example Data WITH comma: "ABC, DEF, BridgeWorks, VDM"
Example Regular API:
Example Escaped Out Values:
IMPORTANT NOTE: When using IN / IN No Parenthesis, older views/calls can still use "," instead of "|,|", but may have an issue if any data has a comma in it.
Valid Example - Comma in Data (IN Type): ('IN'|,|'MA'|,|'BridgeWorks, VDM')
Invalid Example - Comma in Data (IN Type): ('IN','MA','BridgeWorks, VDM')
Multi Value Example for Dates, Strings or Numerics with a property Type of "IN"
When the parameter's Type is set to "IN" the WebReports API expects the following format for Strings values: Parameter?CallType=('IN'|,|'MA'|,|'UM')
Calls with no comma in the values/data can use: ('IN','MA','UM')
When the parameter's Type is set to "IN" the WebReports API expects the following format for Date values: Parameter?CallDate=('2016-09-01'|,|'2016-09-02'|,|'2016-09-03')
Calls with no comma in the values/data can use: ('2016-09-01','2016-09-02','2016-09-03')
When the parameter's Type is set to "IN" the WebReports API expects the following format for Numeric values: Parameter?CallType=(10|,|20|,|30)
Calls with no comma in the values/data can use: (10,20,30)
Multi Value Example for Dates, Strings or Numerics with a property Type of "IN No Parenthesis"
When the parameter's Type is set to "In No Parenthesis" the WebReports API expects the following format for Strings values: Parameter?CallType='IN'|,|'MA'|,|'UM'
Calls with no comma in the values/data can use: 'IN','MA','UM'
When the parameter's Type is set to "In No Parenthesis" the WebReports API expects the following format for Date values: Parameter?CallDate='2016-09-01'|,|'2016-09-02'|,|'2016-09-03'
Calls with no comma in the values/data can use: '2016-09-01','2016-09-02','2016-09-03'
When the parameter's Type is set to "In No Parenthesis" the WebReports API expects the following format for Numeric values: Parameter?CallType=10|,|20|,|30
Calls with no comma in the values/data can use: 10,20,30
Comments