cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (49,899)