web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Forms to Sharepoint List
Power Automate
Unanswered

Forms to Sharepoint List

(0) ShareShare
ReportReport
Posted on by 19

Hi There,

 

I have a Flow that takes data from a Form and creates a Sharepoint list item. The form is a 'Working from home' form, so staff can fill in the days they are in the office or working from home.

 

When I run the form, the flow works where it creates a Sharepoint List Item with the Staff members Name, the Days (Mon - Friday) and what they've selected: For example:

Name: Joe Bloggs   Monday: Working from Home, Tuesday: In the office....... and so on.

 

The problem is the flow creates the first list item and keeps creating more list items if the user re-submits the form. Is there a way for the flow to check if there is already an entry for Joe Bloggs and simply update the day fields with the new data?

Categories:
I have the same question (0)
  • takolota1 Profile Picture
    4,974 Moderator on at

    @mauvis99 

     

    Yes, but some more information on the use case may be helpful.

     

    If these are all staff logged into O365, then there should be a user email dynamic content saved in each response. Start saving that user email to a column in the list. Then in the flow use a SharePoint Get items action after the Get form response with an Odata filter in the Get items set to Email eq ‘Insert form user email dynamic content here’

     

    Then you can use a condition with the expression length(values(‘Get_items’)) is greater than 0

    With the Yes/True side set to Update item in the SP list to update an existing item and the No/False side set to Create item in the SP list.

     

    From there you may need to adjust the Get items filter to your exact use case. For example, Are you only trying to check existing form responses for this week? Or is there some other data point on the form that identifies what week they are submitting for?

  • mauvis99 Profile Picture
    19 on at

    Hi there, thanks for the reply, yes, all staff are on O365, I noticed the response pulls in their email address. When I do a Get Item on the list there’s more details like their Full Name, modified date, submission time. So I was thinking if I can just get the flow to check for the Full name, if there’s a match just update details for that full name, don’t create a new entry. If there isn’t one already in the list, just create the list entry from the filled in form. I’ll try what you’ve suggested, thanks a lot!

  • mauvis99 Profile Picture
    19 on at

    mauvis99_0-1653018810691.png

    mauvis99_1-1653018921801.png

     

    Hi there, I've tried the above, but I find the exising item in my Sharepoint List is not being updated, am i doing it right?

  • takolota1 Profile Picture
    4,974 Moderator on at

    @mauvis99 

     

    No, you put ID in as the array to loop through in the Apply to each. That needs to be the body.

    Or if you just make an update action & start filling it in with the ID from the Get items, it should create the correct loop for you automatically.

  • eliotcole Profile Picture
    4,363 Moderator on at

    This isn't an answer (since I think you're on your way with @takolota ), and I'm not wishing to diminish any or all of the great work that you're both doing here, but could you not use Microsoft Teams' Shifts for a basic lodging of these shifts? 

     

    I've only just looked at it for the first time, and it seems pretty easy to pick up, plus it would eschew the need to manage a list, and various logic processing elsewhere.

     

    Plus, if needed, you can export the details elsewhere.

     

    I just created Shifts details for one of my makeshift Teams on my own tenancy, and then created two Shifts Groups inside that Team's shift pattern. It isn't particularly complicated, and I might want to learn a bit more about it, but the basics are there.

     

    There's also Power Automate flow triggers for shifts, too. Plus I've no doubt with the right poking around you could export that data wherever you liked!

  • mauvis99 Profile Picture
    19 on at

    Thank you!! I’ll definitely check this out! 

  • Verified answer
    mauvis99 Profile Picture
    19 on at

    Hi All,

     

    Seems I figured out a way.

     

    My Solution:

     

    When a new response to My Form is received:

    Get the response details

    Get Items - My List from Sharepoint Lists

    Create Item - from reponse Details

    Create a condition - if 'Get Items ID' is Less than 'Create Items ID'

    Delete Item - 'Get Items ID'

     

    This means that the when the form is created, the response details are gathered, Get the current sharepoint details, check if the ID that is in the List is less than the Newly created ID, if it is less, delete the old ID's. Thanks for all your suggestions

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard