Page 1 of 2

numeric values mapped from storage to query parameters for a service which uses parameter substitution causes an error

Posted: Sun Apr 12, 2015 10:16 am
by conor roche

numeric values mapped from storage to query parameters for a service which uses parameter substitution causes an error. Appery.js line 564:

var newValue = value && value.replace(this.PARAM_PATTERN, __performParametersSubstitution);

it should convert the value to a string first.

A workaround is in the js of the mapping to return "" + value;
but that is awkward.

Image


numeric values mapped from storage to query parameters for a service which uses parameter substitution causes an error

Posted: Sun Apr 12, 2015 2:03 pm
by Illya Stepanov

Hi Conor -

In what builder version have you find this, in AngularJS or jQuery Mobile?


numeric values mapped from storage to query parameters for a service which uses parameter substitution causes an error

Posted: Mon Apr 13, 2015 8:18 am
by conor roche

this is in JQM v 1.4.4, jquery version 2.1.1


numeric values mapped from storage to query parameters for a service which uses parameter substitution causes an error

Posted: Tue Apr 14, 2015 3:38 am
by Yurii Orishchuk

Hi conor,

Please use following JS line of code in top of event handler:

pre

value = String(value);

/pre

Regards.


numeric values mapped from storage to query parameters for a service which uses parameter substitution causes an error

Posted: Tue Apr 14, 2015 3:42 am
by conor roche

while your workaround will work my point was that having to put js in the event handler rather than simply dragging and dropping the mapping is a pain, i think appery should handle non string values as param vals


numeric values mapped from storage to query parameters for a service which uses parameter substitution causes an error

Posted: Thu Apr 16, 2015 1:58 am
by Yurii Orishchuk

Hi Conor,

Please show us your service response parameters screen shot.

  1. open service.

  2. navigate to service tab.

  3. make screen shots

    Thanks.


numeric values mapped from storage to query parameters for a service which uses parameter substitution causes an error

Posted: Sat Apr 18, 2015 3:38 pm
by conor roche

here is the mapping of storage vars to service request params
Image

i have added js to convert to string. if i don't it raises an error as shown in the original screenshot when i opened this topic.


numeric values mapped from storage to query parameters for a service which uses parameter substitution causes an error

Posted: Mon Apr 20, 2015 2:49 am
by Yurii Orishchuk

Hi Conor,

Unfortunatly it's not a requested information.

See details example that we need:
http://prntscr.com/6vwfe3/direct

Regards.


numeric values mapped from storage to query parameters for a service which uses parameter substitution causes an error

Posted: Mon Apr 20, 2015 7:40 am
by conor roche

I don't understand why you are asking for service response parameter screenshot, the problem is with making requests and with the request parameters being numeric not handling the response.


numeric values mapped from storage to query parameters for a service which uses parameter substitution causes an error

Posted: Mon Apr 20, 2015 7:45 am
by conor roche

anyways for this particular service here are the screenshots of the response. note that for this service there is no response body e.g. its a simply 200 ok response.

Image

Image