I have a flow that takes (using GET) data from one API in a string format (even though they are all numbers), and I need to POST it to another API in a number format... I am using the HTTP connector for this.
To convert the string, in the body of the POST request I am simply using 'float'. My problem is that sometimes the string values from the GET are blank... I am trying to get the value to be blank in the POST payload, but I can only get it to display as "".
I'm using the following in the body:
"RP341531.RPSYSFEDCL001A": [
{
"timestamp": @{variables('timestamp')},
"value": @{if(empty(items('Apply_to_each_2')?['post_gac_cl2_ppm_']),’’,float(items('Apply_to_each_2')?['post_gac_cl2_ppm_']))}
}
The resulting payload for the blank values comes out as "value": "" (the code starting IX.... is the mapping for the parameter)
Error response for the POST from the API:
For more information:
This is the first http to get the information
this is where I am posting the information to
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
45 | |
42 | |
37 | |
36 | |
23 |
User | Count |
---|---|
46 | |
31 | |
29 | |
28 | |
28 |