Hi,
I wish to convert strings into values when extracting data from Excel in Flow.
As you can see the below screenshot of my Data in Excel, I'm trying to get the sum of and Names = "Tim" and pass it to outlook connector. With ODATA filter query I was successfully in getting the data for Tim only now the challenge came up when I tried to sum the value by apply to each there is error " The provided value is of type 'String' ", I would appreciate community support in resolving this issue or suggest me better solution for this scenario.
Data In Excel :
Error :
Action 'Set_variable' failed
My Flow :
Thanks in advance..
Regards, Faraz Shaikh
Solved! Go to Solution.
Hi @fshaikh
Step where you adding the value , use float instead of int.
add(float(items('Apply_to_each')['Amounts']),float(variables['Total']))
Regards,
DS
Hi @DeepakS
Tested & it worked out with success thanks for you response.
this green color is sigh of relief 😀
Red highlight was the missing peace of code
Regards, Faraz Shaikh
Hi @fshaikh
You should convert the string to integer before performing sum. You can use int() function do that:
Hi @DeepakS
Thanks for you reply.. which step should I apply this formula in my flow & i need to use float as I few of decimal values.
appreciate your feedback
Regards, Faraz Shaikh
Hi @fshaikh
Step where you adding the value , use float instead of int.
add(float(items('Apply_to_each')['Amounts']),float(variables['Total']))
Regards,
DS
Hi @DeepakS
Tested & it worked out with success thanks for you response.
this green color is sigh of relief 😀
Red highlight was the missing peace of code
Regards, Faraz Shaikh
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 |
---|---|
14 | |
14 | |
7 | |
6 | |
5 |
User | Count |
---|---|
24 | |
17 | |
10 | |
8 | |
6 |