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 Value from One sc...
Power Apps
Unanswered

Pass Value from One screen and form to another screen and form

(0) ShareShare
ReportReport
Posted on by

I have a Screen titled Add, which consists of two forms tied to a SharePoint List.

I have a second screen titled View, tied to the same SharePoint list.

 

I would like to On Save (I have a save button on the Add Screen that uses Patch to update the SP list with the data from the forms).

I want to use the Patch, followed by navigating to the view screen, the item property set to open the data just created (using the ID that was created)

I have tried several ideas but none seem to be working for me.

 

The view screen is multi-purpose

1) It is called from the browse screen I created which is called with a Item property of Gallery1.Selected

2) I was thinking to set a variable on the add screen (save button), then change the Item property to check if the variable was set and open that sp row, or if it was not set use gallery1 selected)

 

When I tried that I couldn't figure out how to set a variable to the value of the id..

 

I imagine there is an easier way, and hence why I am here.

 

 

 

 

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @GregCrossan 

    If you have forms, then you should be using the SubmitForm function to submit your data and not the Patch function.

    All controls are global in PoweApps, so if you are using the SubmitForm function, the form submitted will have a LastSubmit property.  The form is global, so you can access the yourForm.LastSubmit property from any screen in your app.  There is no need to pass it.

    So, your save button formula on the Add screen should be : SubmitForm(yourForm)

    Your Gallery1 OnSelect action should be : Set(glbCurrentRecord, ThisItem)

    The Item property on your forms should be: glbCurrentRecord

    The OnSuccess Action of your form should be:   Set(glbCurrentRecord, Self.LastSubmit)

     

    All of the above changes should give you the results you are looking for.

     

    I hope this is helpful for 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard