cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Fryerman
Regular Visitor

Create multiple List Items from fields in a Single Form

I have created a simple flow that creates a List item when a Form is submitted. The form is used to submit incidents during an event. Now, there may be multiple incidents during the event and I am trying to find out how to create a List item for each incident in the form. I feel I should be able to create a list item for the first incident then loop back and create another for the next until I have got to the end of the list. I am new to this and can't see an obvious way to set it up. Any help appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Fryerman :

Considering that there are fewer fields involved in your form, I think it is much more easier to use multiple "if(equals(targetfiled,")" to determine whether each field is empty.

Best Regards,

Bof

View solution in original post

6 REPLIES 6
v-bofeng-msft
Community Support
Community Support

Hi @Fryerman :

Could you please show more details about the forms you mentioned?Some screenshots better.

Best Regards,

Bof

Hi @v-bofeng-msft 

The form is an MS Forms Form. The screenshot will (hopefully) be at the end of this message.  Fields are simple fields, either single or multi-line text. There are 5 fields at the top which serve as Keys/information for the List item. There are 2 (at least) report fields which are multi-line text. I want to write each of these into a new List item which will include the initial 5 fields. I can sort of do it using Create New Item for each of the report fields and cycling through the process. BUT I would like to read the number of (non-empty - in case someone enters a blank) Report fields and then cycle through Create New Item. Does that seem possible?

Fryerman_0-1627926310409.png

 

Hi @Fryerman :

Do you want to create an item with top5 fields and reprot (Ecemptions), and then create an other item with top5 fields and reprot (Medical)?

If so, you only need two "Create item" actions to create these two projects separately.

Best Regards,

Bof

Hi @v-bofeng-msft 

Yes, that would work, but I have 3 other report field, which may or may not have data entered. I was hoping that there would be a way that I could perhaps read these 'report' fields into an array and loop through them so I only ran Create Item against non-empty fields. Create Item reads ALL the fields so there may be a way to get all the data on the first pass. For subsequent Writes to SharePoint I think I would have to break into the Create Item routine at the point that it Writes a new item.... 
   Anyway, apologies as I maybe wasn't clear on what I was trying to do.

Hi @Fryerman :

Considering that there are fewer fields involved in your form, I think it is much more easier to use multiple "if(equals(targetfiled,")" to determine whether each field is empty.

Best Regards,

Bof

View solution in original post

Fryerman
Regular Visitor

@v-bofeng-msft Thanks. I'd not come across that. It will save me quite a bit. Much appreciated

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,638)