cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
co21
New Member

How to add single quotes to each string in Power Automate Desktop

Hello everyone,

I have an list which is look like this :

 

co21_0-1645534926299.png

 

And i used Join Text Action to separated and join each string with comma and result is going to be :

570-AAIS,580-ADGX,KM5221WBKB-NOR,570-AAIS,DELL-E2720HS

 

And now i want to add single quotes to each string, where i can pass to IN operation into my SQL Query.

The result i'm looking for :

'570-AAIS','580-ADGX','KM5221WBKB-NOR','570-AAIS','DELL-E2720HS'

 

Can anyone please help me to archive this in Power Automate Desktop ?!

Thanks in advance 🙂

1 ACCEPTED SOLUTION

Accepted Solutions

You could also do it like this in two lines of code 😁

Highboy_0-1645608411528.png

Highboy_1-1645608437920.png

Gives the result

Highboy_2-1645608469134.png

 

View solution in original post

5 REPLIES 5
MichaelAnnis
Super User
Super User

Put whatever you actually want into an Escape Text action. The variable produced %EscapedText% is the altered version so that when you use it in anything later, PAD undoes it and gives you what you originally wanted. 

Hmmm I don't get it (I am a bit slow today 😊)
Could you explain how that would translate text from 

a,b,c,d to 'a','b','c','d'

Henrik_M
Super User
Super User

LOOP 0 --> %List.Count-1%

    SET VARIABLE %List[LoopIndex]% TO '%List[LoopIndex]%'

END LOOP

You could also do it like this in two lines of code 😁

Highboy_0-1645608411528.png

Highboy_1-1645608437920.png

Gives the result

Highboy_2-1645608469134.png

 

co21
New Member

Many thanks for help 🙂

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Top Solution Authors
Top Kudoed Authors
Users online (1,600)