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

json

How can i access the single lin of text column which is having the fields value in JSON format using FLOw.

 

I have a column ItemValue 

single lin of text

{

"Status":"Approved",

"Mailvaliditeddate" : "29-09-2018"

}

 

In flow i want to use the field status and Mailvaliditeddate .

Is thete any way to achieve this task.

if i initialize these using flow also i cannot set its value later in flow opertion.

 

Could you please suggets any way of using these value

Can you please let me how can i do that.

4 REPLIES 4
Frequent Visitor

Could you share, how did you create this column, I don't know how to create such a column?

 

Thanks!

Community Support
Community Support

Hi @shaliniverma,

 

Could you please share more details about your column which is having the fields value in JSON format, including the type and how it was created.

 

I tried to create a single line of text in this format using SP list, but when I get the value of this column using get item, I get the value of string type.

 

7.PNG

 

6.PNG

 

So I used the following workaround to get the desired value.

  • Initialize a variable of type object
  • If the value obtained is type of string, use json() function to convert it to json format and assign it to the variable. If the value of your column is in json format, you could assign the column value directly to the variable.
  • Use variable() function to use the field status and Mailvaliditeddate, such as variables('jsonformat')['Status'].

 

Expression reference:

  json(items('Apply_to_each')['OData__x0073_wh5'])  

 

5.PNG

 

The flow works as below:

 

8.PNG

 

 

As is refered in the link below:

https://sergeluca.wordpress.com/2017/11/23/using-json-in-microsoft-flow-part-1/

 

Please take a try and let me know if any issue exist.

 

Best Regards,

Barry

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.

I will try this method and update you if it works

I am getting the result in html format from sharepoint list when i see the value in get item.

 

Could you please show me how you have decalre this variable in sharepoint list column.

 

 

Error :

 

The variable 'ItemValue' of type 'Object' cannot be initialized or updated with value '<div class="ExternalClassDC1BA314D5604A7C88A01ED623D4D661">&quot;Not Approved&quot;, &quot;2018-10-04&quot;, &quot;2018-09-09&quot; </div>' of type 'String'. The variable 'ItemValue' only supports values of types 'Object'.

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (4,459)