cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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

Hi @Anonymous 

 

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

Hi @Anonymous 

 

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!
Anonymous
Not applicable

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
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (3,267)