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

filter a gallery which it filter came from another cloumn

Hi All..

 

I need to filter a gallery which it filter came from another cloumn on a different data source.

 

Here is my current formula i used:
SortByColumns(Search(Filter('D365FO ServiceOrderHeaders', Or(cre83_stageid = "Approved", cre83_stageid = "In Process", cre83_stageid = "Complete")
&& LookUp('SMU_Service Report Headers', SO_Number = 'Service Order Id').Status = "Rejected"), TextInputSearch1.Text, "cre83_description"), "cre83_servicedatetime", Descending)

It's somehow only show the lookup part only. Not include all the items i mention in the formula.

Can somebody please help me get out of this madness?


I need to know how to achieve my needs.


Thanks,

pytbyt

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: filter a gallery which it filter came from another cloumn

Hi @PytByt 

 

The results that will get displayed, they will be based on both the condition specified as part of the expression. They need to be either one of the status and also a lookup column.
 
Can you please confirm if you tried to use the expression: 
 
SortByColumns(Search(Filter('D365FO ServiceOrderHeaders', cre83_stageid = "Approved" || cre83_stageid = "In Process" || cre83_stageid = "Complete" || LookUp('SMU_Service Report Headers', SO_Number = 'Service Order Id').Status = "Rejected"), TextInputSearch1.Text, "cre83_description"), "cre83_servicedatetime", Descending)
 
This will return all the records where either the status exist or the lookup condition satisfies.
 
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!
5 REPLIES 5
Super User
Super User

Re: filter a gallery which it filter came from another cloumn

Hey @PytByt 

 

As per the formula this will filter the results where both the conditions should be satisfied, one is the lookup condition and other is the stage id (It should be either approved, In Process and Complete). Do you want something where the results should be displayed irrespective of the lookup column?
 
If so, you can modify the expression as:
 
SortByColumns(Search(Filter('D365FO ServiceOrderHeaders', cre83_stageid = "Approved" || cre83_stageid = "In Process" || cre83_stageid = "Complete" || LookUp('SMU_Service Report Headers', SO_Number = 'Service Order Id').Status = "Rejected"), TextInputSearch1.Text, "cre83_description"), "cre83_servicedatetime", Descending)
If this differs, please share more details about the data source and the logical implementations you are trying to achieve. Maybe through some examples so that we can assist you better.
 
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!
v-siky-msft
Level 8

Re: filter a gallery which it filter came from another cloumn

Hi @PytByt ,

 

Can you tell me more about what you want filter? What does “the Lookup part only” mean?

According to your formula and my confirmed test , “Or(cre83_stageid = "Approved", cre83_stageid = "In Process", cre83_stageid = "Complete") && LookUp('SMU_Service Report Headers', SO_Number = 'Service Order Id').Status = "Rejected")” means that both conditions need to be met. So the result shown must satisfy the lookup condition.

If you just want the item you filter only meet one of two conditions, you can use or/|| instead of &&.
If not, please tell me more about your filter needs.

Best regards,
Sik

PytByt
Level: Powered On

Re: filter a gallery which it filter came from another cloumn

Hi @v-siky-msft 

When i said “the Lookup part only”, it means i only see the result only from this expression:
LookUp('SMU_Service Report Headers', SO_Number = 'Service Order Id').Status = "Rejected"

I dont see all the result i need from my whole formula.

 

BR.

pytbyt

Super User
Super User

Re: filter a gallery which it filter came from another cloumn

Hi @PytByt 

 

The results that will get displayed, they will be based on both the condition specified as part of the expression. They need to be either one of the status and also a lookup column.
 
Can you please confirm if you tried to use the expression: 
 
SortByColumns(Search(Filter('D365FO ServiceOrderHeaders', cre83_stageid = "Approved" || cre83_stageid = "In Process" || cre83_stageid = "Complete" || LookUp('SMU_Service Report Headers', SO_Number = 'Service Order Id').Status = "Rejected"), TextInputSearch1.Text, "cre83_description"), "cre83_servicedatetime", Descending)
 
This will return all the records where either the status exist or the lookup condition satisfies.
 
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!
Highlighted
PytByt
Level: Powered On

Re: filter a gallery which it filter came from another cloumn

Hi @yashag2255 

I have confirm to use the formula you just gave me. And it fit perfectly as always.

 

Thank you very much. GBU!

 

Cheers,

pytbyt

Helpful resources

Announcements
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

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 242 members 4,928 guests
Please welcome our newest community members: