I have an interesting problem. I am keeping a collection that contains mainly floats and that collection is converted to JSON and sent to a web service. However that web service is very particular about whether it receives integers or floating point numbers.
My issue is, if I add for example 10.0 to a collection, that seems to be stored (or at least visualized as simply 10). However when I then convert that to JSON it also stays as simply 10 which then means on the web service side it now de-serializes as an integer and not the intended float and thus fails.
So my question is, how can I make PowerApps keep my intended data type. I am not sure actually whether this is an issue with the collection or with the JSON function.
Solved! Go to Solution.
This is going to be an issue in the conversion with JSON.
There is not much you can do to change it. So, the only option I might consider is to post-process the text created by JSON.
You can perhaps devise a way to utilize the Match and Substitute functions to find the numbers without decimals and then substitute the format that you want with the substitute.
I hope this is helpful for you.
This is going to be an issue in the conversion with JSON.
There is not much you can do to change it. So, the only option I might consider is to post-process the text created by JSON.
You can perhaps devise a way to utilize the Match and Substitute functions to find the numbers without decimals and then substitute the format that you want with the substitute.
I hope this is helpful for you.
Thanks @RandyHayes
I might look at post-processing as you mention. its an annoying bug which i suspect will never get fixed because i have what i imagine is a rare use case.
For now what I have done is add some epsilon value to each (+0.000...1), subtract it for display, its small enough not to have a material effect on the usage and good enough for now.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
165 | |
94 | |
69 | |
64 | |
63 |
User | Count |
---|---|
222 | |
160 | |
96 | |
86 | |
80 |