cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SheltonThompson
Level: Powered On

Search/Filter to a specific record

I have two forms on a screen for different data sources. Source 1 contains a field called "ID" . Source2 contains a field called "Source1_ID" which ties the specific record back to its associated record in Source 1.

 

The form for source 1 pulls the item based on the item selected from a gallery (same source for both). I am now trying to get its associated record in Source 2 to show in the Source 2. I have tried a filter formula on the item property of the form, but its erroring out saying it returns a table instead of a specific record. How do I filter/search to a specific record for a form?

1 ACCEPTED SOLUTION

Accepted Solutions
SheltonThompson
Level: Powered On

Re: Search/Filter to a specific record

Yea that is what I tried first and it errors out stating it was expecting a record. I just added the First formula to the beginning of my filter to change the results from a table to a single record (the filter returned a single record anyways) and that worked. 

View solution in original post

3 REPLIES 3
Super User
Super User

Re: Search/Filter to a specific record

@SheltonThompson 

 

Try this on your Item for source 2 form:

   Lookup(Source2, Source1_ID = Galleryx.Selected.ID)

 

That will lookup in the source 2 list a specific record where the Source1_ID column is equal to the ID selected in the Gallery

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
SheltonThompson
Level: Powered On

Re: Search/Filter to a specific record

Yea that is what I tried first and it errors out stating it was expecting a record. I just added the First formula to the beginning of my filter to change the results from a table to a single record (the filter returned a single record anyways) and that worked. 

View solution in original post

Super User
Super User

Re: Search/Filter to a specific record

@SheltonThompson 

Lookup returns single records.  Filter returns a table of matching records.

Glad you got it working.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 82 members 2,939 guests
Please welcome our newest community members: