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 Apps / LastSubmit to create a...
Power Apps
Answered

LastSubmit to create a Custom ID and then show the Custom ID on the app

(0) ShareShare
ReportReport
Posted on by 143

I'm using the LastSubmit function to grab the ID (OnSuccess Property) and then using Patch Function to update SharePoint Column called TicketID.

TicketID created is for example CAT-000"ID"

All of the above steps are working, but I want to show the TicketID created to the user after they click on Submit Button

Problem is the LastSubmit + Patch functions take longer to run than code execution, so the TicketID field is blank (even though it is created on the backend)

I'm using this function to call the TicketID after the Patch Function

Set(varTicketID, "Formname", LastSubmit.TicketID)

 

I'm not able to get the TicketID show on the App

 

Thanks

 

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @johnnykalsi ,

    What is the Patch code (in Text please) you are using and is this before or after the form submission. Also I assume you want CAT-IDNo to three characters (CAT-123 when the ID is 123)

  • johnnykalsi Profile Picture
    143 on at

    This is the Code I'm using OnSuccess Property

    With(
     {vLastSubmit: SharePointForm1.LastSubmit},
     Patch(
     DemoOfCustomID,
     vLastSubmit,
     {CustomID: $"CAT-00{vLastSubmit.ID}"}
     )
    );
    Set(varTicketID, SharePointForm1.LastSubmit.CustomID)

    The Custom ID gets created but doesnt show on the PowerApp

     

  • Verified answer
    WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @johnnykalsi ,

    Why not simply create it first

    Set(
     varTicketID,
     "CAT-00" & Self.LastSubmit.ID
    );
    Patch(
     DemoOfCustomID,
     Self.LastSubmit,
     {CustomID: varTicketID}
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • johnnykalsi Profile Picture
    143 on at
    Self.LastSubmit.ID

    Great idea...I didn't know that it could be done like that...and with this I don't need any With Statement

    I'll try it out tomm and reply back

    Thank you

  • johnnykalsi Profile Picture
    143 on at

    it worked and its much simpler than what i had. I didn't know i could use the Self.LastSubmit, which makes it easier

    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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard