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 / Need an alternative to...
Power Apps
Answered

Need an alternative to BrowseGallery1.Selected in an editform

(1) ShareShare
ReportReport
Posted on by 54

 

Under the item section, if I keep the BrowseGallery1.Selected as is, the screen navigates to the most recently selected entry on the browse screen.

When I remove (BrowseGallery1.Selected) the screen goes blank after I click save (SubmitForm(NewForm1)).

 

How can I have it so that the screen stays on the same record when the submit form function is run. So when a user is in this new entry screen they should be able to save without exiting the edit form screen. Like the difference between save, and save and quit. 

 

 

Capture.PNG

 

Thank you!

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    You can set the OnSuccess property to "EditForm(YourForm)." This will reload the form as an edit form with the updated properites.edit.PNG

  • rowlinx Profile Picture
    54 on at

    Capture.PNG

     

    thanks for the quick response, unfortunately this solution runs into the same problem where nothing shows up after I submit the form.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Ok, now I see your problem.

    1. In Screen "OnVisible" UpdateContext({CurItem:BrowseGallery1.Selected})

    2. In the form set "Item" = "CurItem"

    3. In the form "OnSuccess" UpdateContext({CurItem:BrowseGallery1.LastSubmit})

  • rowlinx Profile Picture
    54 on at

    Capture.PNG

     

    Hmm I'm getting an error for the item and OnSuccess for the form but the OnVisible for the screen shows no error

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    What does the error say?

  • rowlinx Profile Picture
    54 on at

    Item: "The property expects Record values, but this rule produces incompatible Error values"

     

    On Success: "The types of the specified context variables are incompatible with the types specified elsewhere"

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hmmmm that is odd. I just tried it and it worked for me....

     

    Maybe you could try this.

     

    1. In Screen "OnVisible" UpdateContext({CurItem: LookUp( DataSource, BrowseGallery1.Selected.ID = ID})

    2. In the form set "Item" = "CurItem"

    3. In the form "OnSuccess" UpdateContext({CurItem: LookUp( DataSource, BrowseGallery1.LastSubmit.ID = ID)})

     

    Where "ID" is the unique identifier for in the data source. This may fix the problem because it garentees that both records have the exact same schema.

  • rowlinx Profile Picture
    54 on at

    I wondered why it works for you and not for me so I created a new autogenerated powerapp but the problem prevails. Perhaps it`s something that comes with the auto generated app that I haven`t caught to erase. 

    I tried your second solution and now thers is an error on the OnSuccess of the form saying "Invalid argument type." Was I supposed to switch DataSource to the name of my data source? I tried doing it both ways 

     

    For the screen I added a bracket and changed the datasource to my datasource for it to get rid of the error "Invalid argument type" so for the OnVisible property I used

    UpdateContext({CurItem: LookUp( proptest2, BrowseGallery1.Selected.ID = ID)})

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    You need to substitute your datasource for "DataSource" and the you need to place the unique identifier column for the "ID" field.

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 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard