Skip to main content

Notifications

Power Automate - Building Flows
Suggested answer

Transfer Item ID from one sharepoint list to another

Posted on by 357

Hello,

 

I am looking to transfer the item ID from one SharePoint List to another SharePoint list in a separate column, based on the submission from a powerapps form. The process goes like this:

 

1. User submits Powerapps form

2. Data set 1 goes to visitor list and data set 2 goes to data list

 

I want to take the autogenerated item ID from the visitor list and place it into the entry for the corresponding item in the data list. I can't just use the autogenerated ID from the data list, as users will re-submit their visitor ID for new entries on the data list. Any idea how I could do this? Flow seems to be the best way, but I am new to working with Flow.

  • Suggested answer
    Mark Nanneman Profile Picture
    Mark Nanneman 329 on at
    Transfer Item ID from one sharepoint list to another
    You could accomplish this by using the .LastSubmit property of your initial user form to get the values from the last submission, and then use the Patch function to patch a copy to an alternate/parallel list.

    Example: 
    Submit button OnSelect:
    -Submit the form
    -Set a variable to save the last submission by looking up the ID of the last submit from the inital user submission list.
    -Perform a patch to the alternate/parallel list.  In addition to saving just the ID in a number column, you could also set a lookup to the other list item in a lookup column using the {Id: <id number>, Value: <item.title>}



    Step 1: User Fills Out their form:
    Step 2: User Submits the Form

    Step 3: (for demo purposes) the alternate list form shows looks up the record on its list that matches the inital form's last submission ID.

    Here the Other List Item Copy Form displays the last submission by Looking up the item from the alternate list where the copy ID column is equal to the ID from the last submission.


    If this helped you, please click "Does this answer your question" and give it a like to help others in the community (+ close the ticket)!

    Power Platform Developer | LinkedIn: Mark Nanneman | Blog: Power Stuff  | YouTube: Mark's Power Stuff  | Buy me a coffee


     
  • AmyWoo Profile Picture
    AmyWoo 11 on at
    Transfer Item ID from one sharepoint list to another
    Thor_PPC - I have the same situation. You said, "I just ended up figuring it out. I didn't realize that flow let you pull data to set a custom variable. So, I made a flow to collect the ID, set it as a custom variable, and then set that variable as the data for a column in the other list."
     
    How did you set up your flow? Would you mind sharing a screenshot of your flow and the variable? I know what needs to happen. I just don't know how to write the flow and variable to make it happen.
     
    Thanks!
     
  • spsolutionsgrp Profile Picture
    spsolutionsgrp 297 on at
    Re: Transfer Item ID from one sharepoint list to another

    Great, glad you got it working.

  • Thor_PPC Profile Picture
    Thor_PPC 357 on at
    Re: Transfer Item ID from one sharepoint list to another

    I  just ended up figuring it out. I didn't realize that flow let you pull data to set a custom variable. So I made a flow to collect the ID, set it as a custom variable, and then set that variable as the data for a column in the other list.


  • spsolutionsgrp Profile Picture
    spsolutionsgrp 297 on at
    Re: Transfer Item ID from one sharepoint list to another

    How are you saving your data from PowerApps?  Submit or Patch?  I wonder if you could save to the first list and then grab the ID and then save to the second list with the ID from the first save.  This would be done in the same click but 2 or 3 different fuctions.   If this is done with flow it could take the ID but how would it know what record to update on the second list.  

     

    I will see if I can test this out and respond with some details.

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,487

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,014

Leaderboard