Form Submission that will update a SharePoint List item Status

Anonymous
2024-12-17T20:49:43+00:00

I am attempting to create a form that has questions/choice answers that directly match items on a SharePoint List. I'd like the form submitter to complete the form, and then use Power Automate to update that matching list item to "Submitted", as well as power other automations from that list item, such as e-mailing the approver they have something to review, etc.

My struggle: Power Automate will not match on a string of text, so I added a unique ID number to the list items, submitted the form with the ID included in a specific form question, and it still will not work properly.

Here is the list view and columns as well as the form I'm using:

Process Overview:

  1. From SharePoint List, send an e-mail to "Preparer" with list line item details in e-mail on specific day each month.
  2. Include link to file submission form in automated e-mail.
  3. When a user completes the form and submits the file with the uinique ID in a form field, this then updates the coresponding line on the SharePoint List to "Submitted".
  4. This change to "Submitted" status then triggers an e-mail to the "Approver" with details about the file submitted and a link to the folder.

errors that i get: cannot match to a string, wrong lines getting updated, so wrong approver getting e-mail about wrong file submitted.

Microsoft 365 and Office | SharePoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2024-12-18T02:02:23+00:00

    Dear Jo,

    For the Unique ID column, may I know whether you use the internal field name in the flow? You can go to List Settings>click on Unique ID, you may get the URL https://contoso.sharepoint.com/sites/sitename/_layouts/15/FldEdit.aspx?List=%7Blist guid%7D&Field=UniqueID0. In my environment, it is UniqueID0.

    So the part of the flow can be like the following.

    Image

    Image

    Filter Query: UniqueID0 eq 'float(outputs('Compose'))'

    Image

    Image

    Image

    Welcome to share any updates at your convenience.

    Thank you for your time and effort.

    Sincerely

    Cliff | Microsoft Community Moderator

    1 person found this answer helpful.
    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Anonymous
    2024-12-19T13:59:56+00:00

    This is the video I referenced: https://www.youtube.com/watch?v=47eu4i4IudA

    I followed/built each step exactly- you can see the details of the attachment array using json, etc. in his video- it's pretty short.

    However, in this video, the form is adding a NEW item to a list with attachments. As with the above query about updating an existing item using my Unique ID (Field_8), I would like the flow to update that same referenced list item with the uploads from the form as attachments to the existing list item. So, rather than "Create an Item" I am using "Update an Item".

    Should I build this flow separate from the steps you outline above to update the Status field on the list item? I have tried to do it both ways- a separate flow, and also adding these steps to the flow above. The flow says it's passing the test, but when I use it out of test mode, the attachments don't appear on the item, only the Status field is updated after the flow completes.

    Thank you again for your continued guidance and assistance on this effort.

    0 comments No comments
  2. Anonymous
    2024-12-20T08:09:16+00:00

    Dear Jo,

    You don't need to create two flows.

    You may need to edit the flow as follows.

    Forms:

    List:

    Flow Details:

    Get file content: items('Apply_to_each_2')?['id']

    Append Array:

    {
    "name":"@{items('Apply_to_each_2')?['name']}",
    "ContentBytes":@{body('Get_file_content')}
    }

    File Name: items('Apply_to_each_3')?['name']

    File Content: items('Apply_to_each_3')?['ContentBytes']

    .

    Welcome to share any updates at your convenience.

    Thank you for your time and effort.

    Sincerely

    Cliff | Microsoft Community Moderator

    0 comments No comments
  3. Anonymous
    2024-12-18T17:29:01+00:00

    these steps and functions were very helpful, thank you. The field name for our unique ID column is field_8. I used that, and it's working successfully. This morning I have been watching a great walk thru video on how to add attachments from the form to the SharePoint list. The flow seems to be setup correctly, and passes, but the steps where attachments get added are being skipped. Seems like a strange step to skip when testing a flow to add attachments.

    The video I referenced was "Creating Items" with multiple attachments. I need to add one or more attachments to existing list items, using the same Unique ID logic outlined above. Again, my flow passes, but it's not adding them. Here is the portion of the flow built to look for attachments:

    0 comments No comments
  4. Anonymous
    2024-12-19T07:45:30+00:00

    Dear Jo,

    Thanks for your updates and kindness.

    From your first post and screenshots, the attachments are got from Microsoft Forms. For personal form, the attachment files should be saved in the Apps folder in your OneDrive for Business site.

    May I know whether you get the file based on the file identifier by using the json() formula in your flow? From the screenshot of the flow, I can't get the details about how you get the file identifier from Forms. If you directly select the dynamic file upload part from the response in the flow, it will not get the specific file identifier.

    You can run a flow instance again from your side to see whether some file ContentBytes from Get File Content.

    For the Append Array part, you can refer to my another thread Attachments can't be opened after they are created in a flow - Microsoft Community.

    If it is convenient, please upload some detailed screenshots about the Append Array part and how you get the file identifier from Forms in your flow for our reference and we'll check whether something is needed to be modified in your flow.

    Note: Remove any private information before uploading the screneshots.

    Welcome to share any updates at your convenience.

    Thank you for your time and effort.

    Sincerely

    Cliff | Microsoft Community Moderator

    0 comments No comments