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
yashag2255
Dual Super User II
Dual Super User II

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
yashag2255
Dual Super User II
Dual Super User II

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

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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 (2,127)