cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Zoran
Helper I
Helper I

ParseJSON output to SharePoint list

Hi there!

 

Need some help with creating new lines in a SharePoint List based on output in a ParseJSON.

I have managed to create all the lines residing in the ParseJSON output, but I have issue as all the data is in string format.

 

Is there a simple way to format some of the string values prior to creation of lines in my SharePoint list?

 

1. Current string value for the date format is "2011.09.20" and the desired is "2011-09-20"

2. Current string value for number is "100.50" and the desired is "100,50"

 

Any help is appreciated, I have worked on this for a wee without any success 😞 

 

BR / Zoran 

 

 

 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions

Hi @Zoran 

 

Check your email.

 

Thanks



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

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

View solution in original post

Thanks Ajith!

 

I truly appreciate the help you provided me to solve this issue.

My flow is finally in place and working as expected 😊.

 

BR / Zoran

View solution in original post

9 REPLIES 9
abm
Super User
Super User

Hi @Zoran 

 

There are different ways you could do this. 

 

Try using the replace expression to convert the date "2011.09.20" to "2011-09-20"



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

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
abm
Super User
Super User

Here is an example of replace() expression

 

image.png

 

Expression for the above is as follows:

 

replace(outputs('Compose'),'.','-')
 
Thanks


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

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
Zoran
Helper I
Helper I

Thanks for helping me out here...

 

Following is my flow...

When I upload a new CSV file to SP folder flow automatically gets the content and so on...(See below)

Its an array of values that get sorted... my remaining problem is that all values are string and I need to convert to two types

- string to to number

- string to correct date format

 

Now where do I put this replace expiration so that I can create correct items in my SP list?

 

Zoran_0-1632170275979.png

 

Hi @Zoran 

 

Under the create item step place your cursor in the relevant field. Then on the right hand side you can see expressions. This is where you normally set the expressions. 

 

If you need any further help in this please let me know.

 

Thanks



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

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
Zoran
Helper I
Helper I

Sorry... I tried, but I'm getting this error: 

Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The template action 'Create_item' at line '1' and column '4435' is not valid: "The template function 'body' is not expected at this location.".'.'.
 
Here is the expression:
replace(Outputs(body('Parse_JSON')?['Summa från betalare']),',','.')
 
 

 

Hi @Zoran 

 

The dynamic reference is wrong. Try adding a compose and map the Parse JSON Dynamic property under that. Then try the expression next referencing the compose output.

 



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

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
Zoran
Helper I
Helper I

Hi ABM!

 

No luck here 😞

 

I reduced my ambitions and I only need to change the numbering format for 'Summa från betalare'.

ex. current number-format 2345,90 to desired number-format 2345.90 (just changing the comma to dot)

 

I tried with replace(Outputs(body('Parse_JSON')?['Summa från betalare']),',','.')" but I did not manage to get it right.

 

Below is detailed scree-dump of  my flow....

Could you please help me get this right?

Where and what changes is needed to get the "Create item" to use the desired number-format 2345.90 ?

 

InkedSkärmklipp1_.jpg

InkedSkärmklipp2_.jpg

 

BR/Zoran

 

 

Hi @Zoran 

 

Check your email.

 

Thanks



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

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Thanks Ajith!

 

I truly appreciate the help you provided me to solve this issue.

My flow is finally in place and working as expected 😊.

 

BR / Zoran

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (4,726)