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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / DataTabe to a String w...
Power Automate
Answered

DataTabe to a String with a consumer separator

(0) ShareShare
ReportReport
Posted on by 2

From the website I extraxt HTML table into the DataTable variable (some of the variables contain a comma)

 

pablora_2-1692097155801.png

 

In the next step I want to write the above variable into a column in the table

 

INSERT TABLE1(column1) VALUES ('%DataTable%');

 

Value is then added to the base (dataTable values are separated by a "comma" - some values in this dataTable may contain a comma) :

SELECT * FROM TABLE1
"xxxx,,
xxxx,yyyy,
xxxx,10528,00 yy,zzz"

 

Can I influence which seperator will be used?

I would like the seperator "|" to be used

SELECT * FROM TABLE1
"xxxx||
xxxx|yyyy|
xxxx|10528,00 yy|zzz"

 

 

I have the same question (0)
  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Yes, it is possible, but you will need to do some text processing for that to happen.

    If you want the entire table to be inserted to a database as a single string, but separate rows to be separated by newlines, while the items inside a row are separated by "|", you'll need to create a list, loop through the table, use Join text on each row to join it using "|" as a separator, then add the result to the list and then when you're done with all those rows, use Join text again to join the list into a single string using newline as the separator.

     

    It should look somewhat like this:

    Agnius_0-1692101734043.png

    You can then use %Result% in your insert statement.

     

    Here's a snippet you can copy and paste directly into PAD to create the actions for you:

    Variables.CreateNewList List=> List
    LOOP FOREACH CurrentItem IN DataTable
     Text.JoinText.JoinWithCustomDelimiter List: CurrentItem CustomDelimiter: $'''|''' Result=> JoinedText
     Variables.AddItemToList Item: JoinedText List: List
    END
    Text.JoinText.JoinWithDelimiter List: List StandardDelimiter: Text.StandardDelimiter.NewLine DelimiterTimes: 1 Result=> Result
    

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 474

#2
11manish Profile Picture

11manish 268

#3
David_MA Profile Picture

David_MA 243 Super User 2026 Season 1

Last 30 days Overall leaderboard