My Typeform connector is "skipping" fields not filled in by users on typeform. This means that once the Typeform submission reaches PowerAutomate, the question fields appear in different orders numerically speaking, depending on what fields the user chose not to fill in.
Have a look at 2 runs below.
In Run 1, I filled in Question 3 in my typeform.
In Run 2, I did not fill in Question 3 in my Typeform
Notice how in Run 1, Question 3 is properly accounted for.
In Run 2, Question 3 is now Question 4, making the rest of the numbers out of order.
At this point, my flow relies on these numbers being in order, as this is how it recognises these fields.
Perhaps you have a suggestion that would make it so that PowerAutomate doesn't rely on the numbering here?
Or Perhaps you would suggest something else?
Please note that I am already using PARSE JSON in this flow, as so:
Also, please note that I have no plans to make all questions obligatory in my Typeform.
@v-yueyun-msft You have resolved this issue for me. Thank you!
For anyone else reading this trying to figure out the solution (across all our comments), here is the flow that Yueyun Zhang so kindly put together, that works perfectly to solve this problem:
Important: Ensure you have set up your flow with the exact action names here:
If you have never worked with Parse JSON before, add all actions up until Parse JSON and save the run. Then, run a test through it. Don't worry, this will fail, but what you will get from it will be the outputs of your Compose 3 action. Copy the outputs of Compose 3, and click back into edit the flow. Now create the the Parse JSON action, add the Compose 3 dynamic content to the Content field. Then click 'Generate from Sample', and paste the outputs of Compose 3 from your test run flow as a sample body of content. Your schema will auto-generate from that.
Then click Save on your flow again, and go back to editing it again. You will now find your answers from Typeform, named according to the questions under the Parse JSON action without numbers attached:
Amazing, right? ✨
Hi , @SquirrelntraNut
Thanks for your response! In my understand , the Select action should return the questions && answers:
Oh! Sorry i add the wrong expression here:
Best Regards,
Yueyun Zhang
@v-yueyun-msft Thanks for all the time you have spent assisting me.
However, it looks like your Select function is taking the Questions (with numbers) & Answers and turning it into the Questions (without numbers) and no Answers.
I know this because when I use the Parse JSON dynamic content, it is only returning the questions and not the answers.
Do you know how to return only the answers to use for dynamic content?
Please note that I still need the questions without numbers to identify the proper answers for this dynamic content.
Hi , @SquirrelntraNut
Thanks for your response! In my understand , we can delete the number in your question in my above reply.
Then we can use the Parse Json action :
And then we can select the question Name and then get each answer:
Best Regards,
Yueyun Zhang
Thanks for this, @v-yueyun-msft. I now need the outputs of each question/answer to use as dynamic content later in the flow. Here is how I was trying to use the original trigger outputs. How do I go about doing that using your new actions?
Hi , @SquirrelntraNut
Thanks for you quick response and your sample json for me to test !
As the json have the ':' so when we use the xml() function will return error in flow. So we may need to change the method..
This is my test flow:
If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance!
Best Regards,
Yueyun Zhang
The goal is to have dynamic content for each typeform answer that is separate from the numbers the trigger delivers each question with (as these numbers change from flow to flow depending on how many fields are filled in on Typeform by each user). I will then apply each typeform answer to pre-determined fields in a sharepoint list in the flow.
Hi, @SquirrelntraNut
Thanks for your quick response ! Can your show your output of your Compose action or your Trigger output in your run history.
As you can try to replace the compose to your output from your trigger.
We need to put this in the string() function:
{
"1:xxxx":"xxx",
"2:xxxx":"xxx"
}
xpath(xml(json(concat('{ "root" ', string(triggerOutputs()?['body'] ), ' }') )) ,'/root/*')
Best Regards,
Yueyun Zhang