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

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

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 Flow Community Video Gallery!

Users Online
Currently online: 379 members 4,322 guests
Please welcome our newest community members: