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

Search with filter and tables relationship

Sorry guys, this question is surely answered tons of times, but I'm not getting through this.

I'm trying to combine filter and search:

 

Search(

    Filter(Orders_Articles; Order.ID = Selected.ID);

    SearchBox.Text;

    "cref0_article.ID"

)

 

I've understood that the problem is that I'm trying to navigate a 1 to many relation between Orders_Articles and Articles table, but how can I achieve that? Should I use a temp table or something? Many thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Search with filter and tables relationship

Hi @Jumpa 

 

Can you try to update your expression as:
 

Search(

    AddColumn(Filter(Orders_Articles; Order.ID = Selected.ID);"ArticleId",Text(cref0_article.ID));

    SearchBox.Text;

    "ArticleId"

)

 
This will create a column in the returned table based which holds the value of ID and you can use this to compare the result. If the ID is stored is not stored as Text, this expression will convert it into Text so that it will become a valid argument for Search function.
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Search with filter and tables relationship

Hi @Jumpa 

 

Can you try to update your expression as:
 

Search(

    AddColumn(Filter(Orders_Articles; Order.ID = Selected.ID);"ArticleId",Text(cref0_article.ID));

    SearchBox.Text;

    "ArticleId"

)

 
This will create a column in the returned table based which holds the value of ID and you can use this to compare the result. If the ID is stored is not stored as Text, this expression will convert it into Text so that it will become a valid argument for Search function.
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Jumpa
Level: Powered On

Re: Search with filter and tables relationship

Many thanks! You'll hear me back soon again... =)

 

Just a side note: the method is AddColumns with the final S even if you have just one field.

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: 319 members 3,609 guests
Please welcome our newest community members: