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

Question about using expression function when adding dynamic content

Hi,

 

I'm trying to add data from a Typeform into a Word template using Power Automate. One of the fields is not coming out how I want it - it's saying :  {"label":"Degree classification"} in the Word document when all I want in there is Degree classification. This is from a multiple choice question on Typeform.

 

Is there an expression function that I can use to get rid of the {"label":""} characters? I've been trying to work it out but haven't managed to as yet.

 

Any help appreciated!

 

Thanks,

 

Nicky

1 ACCEPTED SOLUTION

Accepted Solutions

 

Hi @nickysweetland ,

 

From the output you provided, the question you configured does not support multiple selections, so it only returns one option.

 

You could refer to the following methods to configure Flow and remove unwanted text.

 

Suppose I create a question called MultipleChoice, and the user can only choose one option and submit.

 

First use Compose to get the answer to the question, then use an expression to get the value of the label.

Image reference:

100.PNG101.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
efialttes
Super User
Super User

Hi

I think you can convert it into an object and get the content of its property called label by using the following expression:

json('{"label":"Degree classification"}')?['label']

Hope this helps

 

Flow_json.png



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Thanks @efialttes for such a quick response.

 

It's now returning Degree classification{"label":"Degree classification"}. Which is an improvement! But I still need to get rid of the unwanted text. I also need to be sure that other options from the multichoice question from Typeform can come through, there are about 3 or 4 other options than Degree classification (it's only possible to choose one of them though).

 

I'm sorry for not knowing enough about this to be sure I'm even asking the question correctly! 

 

Thanks again for your help.

 

Nicky

 

Hi @nickysweetland ,

 

From the output you provided, the question you configured does not support multiple selections, so it only returns one option.

 

You could refer to the following methods to configure Flow and remove unwanted text.

 

Suppose I create a question called MultipleChoice, and the user can only choose one option and submit.

 

First use Compose to get the answer to the question, then use an expression to get the value of the label.

Image reference:

100.PNG101.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks @v-bacao-msft  that has worked 🙂 

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.

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.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (1,694)