function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
George Laird 55George Laird 55 

Formula Help in FLOW

Hello, 

I'm building a flow and i need to strip an ID from a response.  Could someone help me with a formula that will take this text...

{"data":425478,"responseId":"154b3a3447a0","timeStamp":"2023-06-21T17:56:13.6865742+00:00","httpStatusCode":201,"isOk":true,"messages":[{"httpStatusCode":201,"messageCode":"CREATED","title":"Item was created","detail":"Call Report 425478 created","isOk":true}],"maxMessageIndex":0,"_v":"AD"}

...and return only the 6 digit ID from after the "data": 

So in the above example i would want 425478 returned only. 

Thanks in advance!  
 
Best Answer chosen by George Laird 55
Arun Kumar 1141Arun Kumar 1141
Hi @George

JSON data must be saved in a string-type variable before being used in a formula. The formula is provided below; use it to your advantage.
MID({!JSON}, 9,6)

Here {!JSON} is a string-type variable where I store the JSON data.
 

Please mark it as the best answer, if the above information was helpful for you.

All Answers

Arun Kumar 1141Arun Kumar 1141
Hi @George

JSON data must be saved in a string-type variable before being used in a formula. The formula is provided below; use it to your advantage.
MID({!JSON}, 9,6)

Here {!JSON} is a string-type variable where I store the JSON data.
 

Please mark it as the best answer, if the above information was helpful for you.

This was selected as the best answer
George Laird 55George Laird 55
Thanks Arun!  Marked as best answer!