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 / Using MS Forms to upda...
Power Automate
Suggested Answer

Using MS Forms to update an existing SharePoint List Item (if the information has been changed)

(0) ShareShare
ReportReport
Posted on by 567
Hi All, 

I've been looking around for a solution to my problem.

I have a MS Form that has branching logic at the beginning of the form: [New Submission] or [Update Information]
 
What I would like to do, is use one form to either enter a new SP List item or update an existing item on the list. 
 
At the moment, if the user selects [Update Information] the MS Form asks for some unique information (Date of Birth and Employee Number) which can only be attached to ONE SP List item (so this is acting as a UID) without the user actually knowing what the SP List ID is. 
 
I would then like the user to enter information that's changed and leave anything that has NOT changed, blank. Then once the form is submitted, only the information the user has entered is changed on the SP List item. 

Is this possible at all?

What flow process would I use for that?
Categories:
I have the same question (0)
  • Suggested answer
    mathiaskjeldsen Profile Picture
    224 on at
    Hey
     
    Yea this should be possible. You should just setup a flow based on the Forms, and add a condition that spells out if its New Submission, you should add a create item in your SP list, and if its Update Information, you should add an action of Get Items and then subsequently Update Item to update the information on the ID in the SP list. 
     
    Best regards
    Mathias Kjeldsen 
     
    ---
    If this has helped solve your problem, please mark it as an helpful answer. 
     
    Connect with me on social platforms by using the links below.
    YouTube: https://www.youtube.com/@matkjeldsen 
    LinkedIn: https://www.linkedin.com/in/mathiaskjeldsen/
  • AdamH Profile Picture
    567 on at
    Creating a new entry is straight forward, the part I'm struggling with is the update a record. 

    My Microsoft form uses Branching - We don't want the user to update all of the fields - so we use branching at the first question  - is this a New Submission or Update. 
     
    If the user select new - then all fields are displayed and they are mapped the correct SP Column.
     
    However, if the user selects Update, two additional "Check" fields appear, which ask the user for unique data to them - so they do not update the wrong record.
     
    So we ask them for their Date of Birth and Employee Number for example. We use this DOB and Employee number as their UID, rather than the SP List ID - because they won't remember this.
     
     
    So the part I'm getting stuck with is, [Get Items] and [Update Item] 
    I need to use the submitted "Check" Date of Birth and Employee Number to search the correct columns in SP which contain that original  data and when found, update the record with the information they have changed. 

    I'm not sure if I need to filter / use an expression... 

  • Suggested answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    Hi @AdamH
     
    To update the fields only based on what you have entered in forms, you need to use conditional branching where you have to check whether fields value entered in MS form is empty or empty , if not empty- use update item to update that field accordingly. But problem is it becomes too complex as number of conditions action to be used depends upon numbers of fields need to be updated in Sharepoint.
     
    So another easy would be use single update item action and update all fields at once with its original value present for that item even if the form field value is empty- this makes the code less complex.
     
    To get an idea of this- refer the flow as shown below
     
    Assume i have below SP list where i need to update JOb and amount field based on UID which is unique identifier for each record.
     
    So the flow design to update the fields would be like below, here user enters the UID need to be updated and other fields need to be updated associated with that.
     
    i have designed a sample form like below
     
    Now the flow would be like below
     
    1. Use form's trigger and associated actions to get the response details as shown below

     
    2. Now use get items to get the details of item for given UID entered in form
    Here i am using ODATA filter query to filter details of given item having UID entered in form.
     
    3. use update item to update the item details based on details entered in form as shown below
     
    The above expression for ID field is for finding the ID of list item where uid equals as entered in form.
     
    first(outputs('Get_items')?['body/value'])?['ID']
     
    Now coming to update fields - Job and Amount , see the expression used below
    for Job field, this expression has been used
    if(empty(outputs('Get_response_details')?['body/r5865bfa48e3944a5b6dcd24bf8a03aec']),first(outputs('Get_items')?['body/value'])?['Job'],outputs('Get_response_details')?['body/r5865bfa48e3944a5b6dcd24bf8a03aec'])
     
    Here the above expression checks whether MS form field for Job has empty value- if yes flow updates the field with value already present in list item, else it will take the value present in form field.
     
    The same kind of expression will be used for in amount field as well.
     
    So this logic is for updation part. In your case, you need two fields to lookup the item details- so update the Odata query accordingly using logical operators- refer for more details
     
     
    Hope this helps !
    Thanks & Regards,
    Nived N 
    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs
     Found my answer helpful? Please consider marking it as the solution!
     Your appreciation keeps me motivated. Thank you!

     
  • AdamH Profile Picture
    567 on at
    Hi - Thank you for that. 
     
    This is very close, but the field I changed, became blank instead of entering the new value. 
     
    I was looking at the expression - where / what is this value? 'body/r5865.........'

    I copied your expression but then realised that this could be unique to the MS Form?
     
    if(empty(outputs('Get_response_details')?['body/r5865bfa48e3944a5b6dcd24bf8a03aec']),first(outputs('Get_items')?['body/value'])?['Job'],outputs('Get_response_details')?['body/r5865bfa48e3944a5b6dcd24bf8a03aec'])
    
     
  • AL-10082129-0 Profile Picture
    3 on at
    Hi Adam,
     
    Yes that value you are talking about is unique in every form created.
     
    That is the dynamic value of the response so you can replace that value with what you get from your form reponse
  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    Hi @AdamH 
     
    Sorry I forget to mention that.
     
    Thanks for mentioning the point @AL-10082129-0 
     
    Hope this helps !
    Thanks & Regards,
    Nived N 
    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs
     Found my answer helpful? Please consider marking it as the solution!
     Your appreciation keeps me motivated. Thank you!

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 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard