cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sudosaurus
Post Partisan
Post Partisan

How do I remove quotes in my Compose actions for word online template

Hello,

 

In my below flow I am using Plumsail forms as the trigger and have an Initialize Variable action for getting info from a multi-choice column.

 

sudosaurus_0-1634819256647.png

I then have an apply to each action that Composes the output of this in order for me to populate a Microsoft Word Online Template:

sudosaurus_1-1634819326047.png

 

What I am wondering is how do I get the quotes and brackets removed from the output?

 

Essentially I dont want these values displaying as below in the document:

 

sudosaurus_2-1634819522109.png

Ideally, I'd want it to display as Yes, Part time

 

Any advice would be ideal!

 

Thanks 😄

 

9 REPLIES 9
tom_riha
Super User
Super User

Hello @sudosaurus ,

since it's an array, you can use the join(...) expression to turn it from array to a string, e.g.

join(variables('varDoYouAttendaTrainingScheme'),', ')

The first parameter is the array, the second parameter is the connector you want to use between the items in the array.

 



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]
sudosaurus
Post Partisan
Post Partisan

@tom_riha where exactly do I put this in the workflow?

 

adding it here (in red), makes the flow fail..

 

sudosaurus_0-1634824833631.png

 

 

Hello @sudosaurus ,

you should place it where you want to convert the array, e.g. [ "Yes", "part time" ] to a string 'Yes, part time'. That's all the expression does, connect the pieces with the desired separator.

Also, in the expression, replace the first parameter in the expression with the dynamic content that contains the [ "Yes", "part time" ], I wrote it more as an example.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]
sudosaurus
Post Partisan
Post Partisan

@tom_riha not sure I'm getting it..

sudosaurus_1-1634829005319.png

 

sudosaurus_0-1634828971005.png

 

So the variable is called varAreYouEmployed and the field from the submitted Plumsail form is called AreYouEmployed

 

sudosaurus_2-1634829192206.png

 

I guess I'm trying to understand where to do the split function you've mentioned above?!

 

Thanks

You have a mistake in the expression, it should be join(variables(‘varAre…)), not join(AreYou…). You want to access content of the variable



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]
sudosaurus
Post Partisan
Post Partisan

@tom_riha @If you have time to provide screenshots to assist I’d really appreciate that. 

It should go like this:

  1. Store the current value from AreYouEmploy... in the 'ComposeAreYouEmployed'
  2. From there, convert it into a string with the join(...) expression and append it to the variable

 

image.png



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]
sudosaurus
Post Partisan
Post Partisan

@tom_riha this is great thank you so much! 🙏

 

One last thing, how can I space out the results? So a space after the comma?

ie Yes, Full time

sudosaurus_0-1634910439968.png

 

Yes, as you said, space after the comma. It will use everything you place between the single quotes as the connector. 



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,224)