cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MD7648
Level: Powered On

Get optional responses

I have setup a MS Form that users need to fill out to submit a list of authors, I need to be able to set a variable that populates a field that gathers those together or ignores them if no data entered, can anyone help? 

 

The form is set so you can select from 1 to 6 authors, the flow then collects that data together. 

 

authors_form1.JPGauthors_form2.JPG

 

 

So ideally the flow should then be able to say "ok so we have 3 authors, then I'll fill out Author Surname 1, Author Forename 1, Author Surname 2, Author Forename 2, Author Surname 3, Author Forename 3" and set as a variable.

 

Completely ignoring any requests for author forename 4+ and any formating in the variable box that does'nt match

 

authors.JPG

 

authors2.JPG

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Get optional responses

Hi @MD7648,

 

You can initialize a String variable named Message, and change the Authors variable into an Array variable.Annotation 2019-10-24 104148.png

Get the response, and create an object array as below, put the array into the Authors array:

Annotation 2019-10-24 104227.pngCreate an Apply to each action, then add the expression length(item()?['Author Surname']) into the condition, if the length of Author Surname is equal to 0, Append the Message string variable as below:

Annotation 2019-10-24 104345.png

Run result:Annotation 2019-10-24 105357.png

Please have a try, it will help you.

 

Best Regards,
Community Support Team _ Lin Tu
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

1 REPLY 1
Community Support Team
Community Support Team

Re: Get optional responses

Hi @MD7648,

 

You can initialize a String variable named Message, and change the Authors variable into an Array variable.Annotation 2019-10-24 104148.png

Get the response, and create an object array as below, put the array into the Authors array:

Annotation 2019-10-24 104227.pngCreate an Apply to each action, then add the expression length(item()?['Author Surname']) into the condition, if the length of Author Surname is equal to 0, Append the Message string variable as below:

Annotation 2019-10-24 104345.png

Run result:Annotation 2019-10-24 105357.png

Please have a try, it will help you.

 

Best Regards,
Community Support Team _ Lin Tu
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

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Coming Soon: T-shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors
Users online (5,956)