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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / List ID Displayed in P...
Power Apps
Answered

List ID Displayed in Popup after Submitting

(0) ShareShare
ReportReport
Posted on by 20

Hello!

 

I have already created a working "Submit Form" that will display a pop-up for a success if required information is filled out, and an error message for when required information is missing... Now, one thing I am trying to add to this success pop-up is a text that displays the most recent form/list ID for the user to store for future referencing purposes.

I have found a few results via Google and this forum on how to get the last list ID, however, I am still confused.

 

In my "Submit Form" button, I have the following formula:
IfError(Patch('DATABASE NAME',Defaults('DATABASE NAME'),Form1.Updates,Form2.Updates,Form3.Updates,Form4.Updates,Form5.Updates,Form6.Updates);Set(varShowPopup1,true);Set(varShowPopup2,false),Set(varShowPopup2,true);Set(varShowPopup1,false))

For reference, "varShowPopup1" is the "Submission Confirmed" pop-up and "varShowPopup2" is the "Error" pop-up.  I have customized the design of the screen by utilizing multiple forms, hence the long "Updates" portion.

Is it possible to display the most recent form ID only when it successfully submits?  And display this on the pop-up?  Or is there a better solution that I should explore instead?

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

    Hi @TJ-25,

     

    You can use LastSubmit() function to get the item you want,

    Reference Post

     

    Set the data accordingly and use in pop-up or Notify the last submits.

     

    Hope this helps

  • timl Profile Picture
    37,212 Super User 2026 Season 1 on at

    Hi @TJ-25 

    Since you're adding a new record by calling Patch, the return value from Patch will contain the new record.

    IfError(
     Set(varNewRecord,
     Patch('DATABASE NAME',
     Defaults('DATABASE NAME'),
     Form1.Updates,Form2.Updates,Form3.Updates,Form4.Updates,Form5.Updates,Form6.Updates
     );
     Set(varShowPopup1,true);
     Set(varShowPopup2,false),
     Set(varShowPopup2,true);
     Set(varShowPopup1,false)
    )
    

     

    Taking the example formula above, varNewRecord will contain the new record. Therefore, you should be able to display the ID by adding a label to your Submission Confirmed" pop-up and setting the text property to varNewRecord.ID

  • TJ-25 Profile Picture
    20 on at

    Hi @timl!


    Thank you for your reply!  For some reason, this function is not working for me when input as suggested.  If the 'ID' column is already enabled in the list - is there a way to simply retrieve that if the display is a pop-up rather than on the same screen?  I read Ethan_R's response with the LastSubmit - but I could not figure how to make that work, still a bit of a newbie.

    My goal is that this will be hidden, and should then become visible and auto-populate the new form ID number after it submits the form(s).  Does this need to be a "Edit Form" in this circumstance or is it a "Text Label"?

     

    Update:  I should note, I have inserted a textlabel with "Form1.LastSubmit.ID" in the "Text" advanced property and this is not populating the number either.

     

    Update 2: I found a way, using a TextLabel and in the "Text" property I put the formula "Last('DATABASE NAME').ID"
    Will this number change if multiple people are submitting at the same time, or will each user see their own respective number?

     

    Thanks in advance!

  • Verified answer
    TJ-25 Profile Picture
    20 on at

    Update three, and a solution - I've answered my own question. 😜

    For any replication purposes:
    - I created a form that has two pop-up based on the success or failure of the form submission.
         > PopUp1 - Confirmed/Success Pop-Up (displays confirmation message, shows List ID, and includes a button that resets all forms then returns user to the menu.)

         > PopUp2 - Denied/Error Pop-Up (displays error message that required fields were not completed, includes button that closes message and returns to form to complete.)

    - In the confirmation pop-up, I was looking to find a way to retrieve the last submitted line ID from the SharePoint List housing the data.

    - I tried the LastSubmit suggestion, would not work, I tried the "varNewRecord" suggestion and this also did not work.

    - I created a text label and in the "Text" property I put the following function, which successfully pulled the submitted form's ID:

     

    Last('DATABASE NAME').ID

     

    - I tested this in two open instances where users would have created a ticket simultaneously; no issues with reporting the correct ID from the database.

     

    Success!  Thank you to @Ethan_R and @timl for your suggestions.  While they were not the results I needed, I'm certain they work elsewhere.  Much appreciated though.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 477

#2
WarrenBelz Profile Picture

WarrenBelz 341 Most Valuable Professional

#3
11manish Profile Picture

11manish 317

Last 30 days Overall leaderboard