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 / Pass form value to ano...
Power Apps
Answered

Pass form value to another scree

(0) ShareShare
ReportReport
Posted on by 321

EditscreenEditscreenSuccess screenSuccess screen 

I want to pass values form my editform to another screen after I submit my form. 

Categories:
  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @codeworks,

     

    After submitting a Form you can reference the Last Submit data via:

    //Replace with correct names
    FormName.LastSubmit.ColumnName
    
    //Example
    Form1.LastSubmit.RequesterName

     

    You can save the last submitted record to a variable while navigating:

    Navigate(ScreenName, ScreenTransition.None, {lclLastSubmit: FormName.LastSubmit})
    
    //Referencing is done via lclLastSubmit.ColumnName

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • madlad Profile Picture
    2,637 Moderator on at

    Your best bet is most likely to store it as a variable on for submission, and then reference that in the next screen. 

    Something like

    Set(QRCode, *YourForm*.LastSubmit.*QRCode*);

     

    Hope this helps!

  • akselmb Profile Picture
    65 on at

    Hi @codeworks 

     

    If you are using the Navigate-function on the OnSuccess-property for your form to change to the other screen. You can write it likes this:

    Navigate(SuccessScreen, ScreenTransition.None, {yourVariableName: yourFormName.LastSubmit.nameOfField, yourVariableName2...})

     

  • codeworks Profile Picture
    321 on at

    OnSelect of Generate Qr

    Set(QRdata, EditForm1.LastSubmit.ID); 
    
    SubmitForm(EditForm1);
    
    Navigate(
     QrScreen,
     ScreenTransition.Fade
    )
    
    

    The Navigations is not working

  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @codeworks,

     

    The code that you want to run after a form submission should preferably be written in the OnSuccess of the form. Additionally, the LastSubmit variable should be initiated after submitting the Form (otherwise you are saving the submission before the current one).

     

    OnSelect of your QR code button:

    SubmitForm(EditForm1);

     

    OnSuccess of your form:

    //Changed to save the complete record instead of just the ID
    Set(QRdata, EditForm1.LastSubmit); 
    Navigate(
     QrScreen,
     ScreenTransition.Fade
    )

     

    If you only need the form data on the second screen, you may want to use a local variable instead of a global one:

    Navigate(
     QrScreen,
     ScreenTransition.Fade,
     {lclQRData: EditForm1.LastSubmit}
    )

     

    I hope this helps!

  • codeworks Profile Picture
    321 on at

    The image property of the generated QR code image on the second screen is throwing error 

    If(
     QRdata = "" || IsBlank(QRdata),
     "https://api.qrserver.com/v1/create-qr-code/?size=300x300&data= " & varUserEmail,
     "https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=" & QRdata 
    )

    Errror 1:Invalid argument type. Expecting one of the following: Text, Number, Decimal, Date, Time, DateTimeNoTimeZone, DateTime, Boolean, OptionSetValue, ViewValue, UntypedObject.

    Error 2: Incompatible types for comparison. These types can't be compared: Record, Text.

     

    Both errors occurs on var QRdata

  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @codeworks,

     

    Using Set(QRdata, EditForm1.LastSubmit) saves the complete record to that variable. You will now have to specify the column name in your code (Qrdata.ColumnName) - I assume you want to reference ID?

     

    If(
     //Note: using IsBlank(QRdata.ID) is sufficient
     QRdata.ID = "" || IsBlank(QRdata.ID),
     "https://api.qrserver.com/v1/create-qr-code/?size=300x300&data= " & varUserEmail,
     "https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=" & QRdata.ID 
    )

     

    I hope this helps!

  • codeworks Profile Picture
    321 on at

    Thanks!!!!. This solves the problem.

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 394 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

Last 30 days Overall leaderboard