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
Join digitally, March 2โ4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
User | Count |
---|---|
34 | |
15 | |
15 | |
13 | |
7 |
User | Count |
---|---|
42 | |
32 | |
25 | |
12 | |
12 |