cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dom_mitchell
Frequent Visitor

Only create SharePoint List entry IF a specific Form field has data

Hi everyone!

 

I'm trying to find a way to make an automation even slicker. 

 

I have a Form that is used to add the dates of a new employee's onboarding training sessions to a SP List in the L&D site. 

The Form has one question for each of the standard onboarding trainings and there is one Create Item Action for each question so that a row is created in the list for each different training.

 

My problem is that as it stands, a row in the list is created for each step, even if there isn't a date in each field (not everyone will necessarily do every single training). Is there a more elegant way to stop the Training Bookings list becoming populated with a load of row that don't have a Date of Session in? 

 

Screenshot 2022-05-20 143958.jpg

 

I've tried to look at conditions but it appears as though that would get really complex as there are 19 potential dates on Form so the "if yes, if no" list would grow massive very quickly. 

Would one option be to create a second Flow that runs when a new item is created that deletes it if there is no date in the Date of Session field? 

 

Any better solutions? 

1 ACCEPTED SOLUTION

Accepted Solutions
v-jefferni
Community Support
Community Support

Hi @dom_mitchell ,

 

As per you will have one new entry in the list for one question from the Form, I would say that to delete an entry if the specific field of a new item is blank can be the most efficient way to achieve your need. Only one Condition control is needed in that automated flow.

 

Best regards,

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

3 REPLIES 3
v-jefferni
Community Support
Community Support

Hi @dom_mitchell ,

 

As per you will have one new entry in the list for one question from the Form, I would say that to delete an entry if the specific field of a new item is blank can be the most efficient way to achieve your need. Only one Condition control is needed in that automated flow.

 

Best regards,

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Thanks @v-jefferni !

 

I think you've just given me a 'penny drop' moment there. 

I single condition after everything is then Created to go back and delete rows of data that have field missing right? 

I was initially thinking a complex waterfall of conditions to only Create item if data present in the form.

 

Now just to work out to delete a single item if a field is empty. Very nervous about accidentally deleting all the data in the list! 

Hi @dom_mitchell ,

 

The trigger of the second flow is supposed to be "When an item is created" in that specific list. I don't think you will populate that list manually, right? So only after Form's submission, the first flow will start to create items based on the form, and the second flow will start to eliminate items based on the time field. There won't be a chance for the flow to delete something accidentally, I suppose.

 

Best regards,

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

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 (2,937)