Using Property Transfer in Ready API, How Can I Transfer a Numeric Value into JSON object?
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using Property Transfer in Ready API, How Can I Transfer a Numeric Value into JSON object?
Hi,
When fetching data source from EXCEL file, I need to transfer some of the values to JSON objects. All values are being parsed in as string format. How can I parse in values as integer instead when using property transfer step?
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey @MFzOS
Ok - so I've set it up and it runs fine - when I first did it, it auto generated quote marks around the numeric values that ive parameterized in my payload, but once I'd removed them it works fine
have a look at the following screenshots:
In the above screenshot you can see Im sourcing data from a csv using the Datasource (file) type.
The first two values auto generate alpha numeric values, but column 3 includes a numeric and column 4 includes a string 1.0 is wrapped in quotes
Next - if you look at the REST request in the screenshot below - in the Request tab and the payload editable field - you can see Im sourcing data from the Data Source test step.
if you look at the 'defraexp_ehcstatus' attribute value in the input payload above - the parameterized value is NOT wrapped in quotes (so it's numeric)
If you look at the 'defraexp_ehcversion' attribute value in the input payload above - the parameterized value IS wrapped in quotes (so it's a string)
Now - if you look at the next screenshot, you can see the RAW of the request - which shows what is submitted - in this case, the submitted payload maintained the attributes' datatypes relative to what was defined
cool?
Cheers,
Rich
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great! This is actually working. I just think it is a bit strange that when moving properties using Property Transfer or even entering values manually via Grid view it doesn't take the type of the attribute under consideration.
Many thanks for your help, Rich!
Cheers!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey @MFzOS
Yeah - is a bit weird - also - when I tried initially it inserted quote marks into my payload around the numerics automatically that I had to remove - even though there weren't any to begin with - that's not gonna help someone a little unfamiliar with the functionality - theyre just gonna struggle thinking it doesnt support numerics!
I might have a play around with the functionality to work out in the ins and outs of it - as i said in the original message - values are saved as strings - but with a json payload - it's whether you've included quote marks in your payload that determines whether it's a string or numeric.
Anyway - glad you got it sorted!
Rich

- « Previous
-
- 1
- 2
- Next »
- « Previous
-
- 1
- 2
- Next »