cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mrpowergage
Resolver I
Resolver I

Child flow number is returning a string

I've created a child flow which returns a float variable as a number. However it seems to arrive with the parent flow as a string, which casues an error. I have included the 'returned expense' variable in the parent flow to make explicit what is happening.

 

Any ideas what is wrong and what I need to do to fix it would be appreciated.

 

child:

Edit_your_flow___Power_Automate.png

parent:

Edit_your_flow___Power_Automate.png

Error:

Run_History___Power_Automate.png

2 ACCEPTED SOLUTIONS

Accepted Solutions
Pstork1
Dual Super User
Dual Super User

Have you tried just putting the returned variable inside a float() function?  I suspect that the JSON being returned is being interpreted as a string rather than a float and you'll have to manually convert the returned value.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

v-bacao-msft
Community Support
Community Support

 

Hi @mrpowergage ,

 

You could use Compose to output Expense under Run a Child Flow to see its format and value.

Then, as suggested by Pstork1, use the float() function to convert the string to float.

218.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Pstork1
Dual Super User
Dual Super User

Have you tried just putting the returned variable inside a float() function?  I suspect that the JSON being returned is being interpreted as a string rather than a float and you'll have to manually convert the returned value.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
v-bacao-msft
Community Support
Community Support

 

Hi @mrpowergage ,

 

You could use Compose to output Expense under Run a Child Flow to see its format and value.

Then, as suggested by Pstork1, use the float() function to convert the string to float.

218.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (4,294)