cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nigel_s
Advocate I
Advocate I

Displaying a record based on ThisItem or Selected

I have a standard mobile app, with a gallery, details form and edit form, with a slight twist in the OnSuccess method in the edit form. If the data entered meets certain criteria, the app navigates to the display screen rather than the gallery and displays the record with some additional information.

 

At present, I've got the Items property on the Details forms set to LookUp('[dbo].[Observation]',ID=varCurrRecId), where varCurrRecId was set in the EditForm's OnSuccess event or by the gallery Select event but it's slow and confusing as an old record might show for a second or two.

 

I want to base the record on ThisItem or EditForm.LastSubmitted, like Carlos does in his Decoupling the Gallery from Forms post.

Carlos doesn't mention what he set the DataSource property to and I get an "Invalid formula. Expected a value compatible with 'DataSource'" error when I set the item property.

 

Does this technique still work? If so, is the DataSource simply set to the same DataSource as the gallery, which is Observation for me?

Finally a shout out to the speed and quality of the answers here. Really appreciate that.

Navigate('Event Details', ScreenTransition.None, {varCurrRec: BrowseGallery1.Selected});

 

PowerAppItem1.png
10 REPLIES 10

Thanks @nigel_s ,

There are only two ways of changing a Control value - user input or a Reset. I would imagine both would trigger any OnChange event attached.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,031)