web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / ParseJSON output to Sh...
Power Automate
Unanswered

ParseJSON output to SharePoint list

(0) ShareShare
ReportReport
Posted on by 81

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 

 

 

 

 

 

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    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"

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Here is an example of replace() expression

     

    image.png

     

    Expression for the above is as follows:

     

    replace(outputs('Compose'),'.','-')
     
    Thanks
  • Zoran Profile Picture
    81 on at

    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

     

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    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

  • Zoran Profile Picture
    81 on at

    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']),',','.')
     
     

     

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    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.

     

  • Zoran Profile Picture
    81 on at

    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

     

     

  • Verified answer
    abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @Zoran 

     

    Check your email.

     

    Thanks

  • Verified answer
    Zoran Profile Picture
    81 on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard