cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
shaliniverma
Level: Powered On

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
HideonBush
Level: Powered On

Re: json

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

 

Thanks!

Community Support Team
Community Support Team

Re: json

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.
shaliniverma
Level: Powered On

Re: json

I will try this method and update you if it works

shaliniverma
Level: Powered On

Re: json

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
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

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!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,263)