cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Having difficulty converting JSON string value to integer

I have a flow that I am trying to extract a value from a Parse JSON output and convert the text string value to an integer. I have read through forums and references which all suggest int() is the way to go however I cannot get the value to convert, let alone pass as a string to confirm the flow is successfully extracting the string value. Does anyone have any suggestions on what I can try next or spot any issues with my flow?

 

Flow:

2020-01-26 20_49_50-Edit your flow _ Power Automate.png

 

Run history:

2020-01-26 20_39_10-Run History _ Power Automate.png

3 REPLIES 3
Highlighted
Super User III
Super User III

Re: Having difficulty converting JSON string value to integer

Hello,

Have you tried using the initialize variable at the top of your flow with a blank value,

Than use a set variable where you have the initialize.

Thanks

--Josh

If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others




Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




Highlighted
Frequent Visitor

Re: Having difficulty converting JSON string value to integer

Hi @Jcook , thanks for the reply.

 

I've tried that approach, albeit probably incorrectly, but was not successful in accessing the key and value from the JSON Array. I'm still new to Power Automate and JSON. Do you have a suggestion on a resource that would explain the syntax for accessing a key/value within an array?

 

To give more context, the data comes in from Adobe Sign and is converted to a CSV string, then added to a JSON array before being output in the Parse JSON for use in various ways.

 

Here is a screenshot of earlier in the flow process.

2020-01-26 22_19_45-Edit your flow _ Power Automate.png

Highlighted
Super User III
Super User III

Re: Having difficulty converting JSON string value to integer

I will be able to help more once I am home.

One thing I noticed is you’re using a Set variable inside the loop. You can only use a Set variable in a loop if your concurrency is set to 1, this will make your flow perform slow but it’s worth a try if you don’t have my data to process.

To try the fix. Click on the 3 dots on the apply to each shape. And turn on Concurrency and set it’s value to 1.

If you have already tried this, sorry.

Try to use Compose action over the set variable. Because compose does not get affected the same way a Set variable does.

Again I can look more into this later tonight if no solution has been made.

--Josh

If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others




Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (8,197)