cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
VineethKN
Helper I
Helper I

Multiple filters on 2 lists

Hi All,

i have 2 dropdowns, which i need to check if the selected values are equal and based on that populate the 3rd dropdown, also have another level of filter on this 3rd dropdown, how can i achive this

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @VineethKN ,

Based on the formula that you provided, I think there is something wrong with it.

 

I have made a test on my side, please consider modify your formula as below:

 

SortByColumns(
Filter(
RoutingMethod,
RecordId in Filter(RoutingLink, GBERecordId = dd_SbgGbe.Selected.RecordID).RoutingRecordId,
Text(ActiveStatus) = "true",
If( /* <-- Modify your If function as here: */
OriginCountry = DestCountry,
RoutingType = "Both" || RoutingType= "Domestic",
RoutingType="Both" || RoutingType = "International"
)
),
"RoutinfCode",
Descending
)

Please consider take a try with above formula, then check if the issue is solved.

 

More details about Filter function and If function in PowerApps, please check the following article:

Filter function

If function

 

Best regards,

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

9 REPLIES 9
svijay_001
Microsoft
Microsoft

Can you please elaborate on your requirement ? It is little confusing. 

svijay_001
Microsoft
Microsoft

@VineethKN 
Can you please elaborate on your requirement ? It is little confusing. 

yashag2255
Dual Super User II
Dual Super User II

Hi @VineethKN 

 

To compare the value between two dropdown selections, you can use if statement to achieve your needs:

If(Dropdown1.Selected.Result = Dropdown2.Selected.Result, true- do something , false - do something)
For the filter on third dropdown, you can modify your formula as below:

Filter(DataSource, Condition1 && If(Dropdown1.Selected.Result = Dropdown2.Selected.Result, <<Action if true>> ,<<Action if not true>>) && Condition2 )
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!

Hi Yashag, thanks for the reply,

am getting error which i use Filters inside if condition Invalid Argument Type: expecting one of the following : boolean, number , text

what is that am doin wrong,

 

Hi @VineethKN 

 

Can you please share a snippet of the code/ screenshot of the error and the expression so that I can have a better look and assit you with this?

Am very new to Powerapps, so please pardon my syntax if it is wrong 🙂

 

SortByColumns(Filter (
RoutingMethod,
RecordId in ShowColumns (
Filter (
RoutingLink,
GBERecordId = dd_SbgGbe.Selected.RecordID
),
"RoutingRecordId"
).RoutingRecordId && Text(ActiveStatus) = "true"
) If(OriginCountry = DestCountry, Filter(RoutingMethod, RoutingType = "Both" || RoutingType= "Domestic" ), Filter(RoutingMethod, RoutingType="Both" || RoutingType = "International")), "RoutinfCode" )

Hi @VineethKN 

 

Can you try:

SortByColumns
(
    Filter(RoutingMethod,
        If(OriginCountry = DestCountry,RoutingType = "Both" || RoutingType= "Domestic",RoutingType="Both" || RoutingType = "International")
        &&
        RecordId in Filter(
            RoutingLink,
            GBERecordId = dd_SbgGbe.Selected.RecordID
        ).RoutingRecordId
        &&
        Text(ActiveStatus) = "true"
)

Hi @VineethKN ,

Based on the formula that you provided, I think there is something wrong with it.

 

I have made a test on my side, please consider modify your formula as below:

 

SortByColumns(
Filter(
RoutingMethod,
RecordId in Filter(RoutingLink, GBERecordId = dd_SbgGbe.Selected.RecordID).RoutingRecordId,
Text(ActiveStatus) = "true",
If( /* <-- Modify your If function as here: */
OriginCountry = DestCountry,
RoutingType = "Both" || RoutingType= "Domestic",
RoutingType="Both" || RoutingType = "International"
)
),
"RoutinfCode",
Descending
)

Please consider take a try with above formula, then check if the issue is solved.

 

More details about Filter function and If function in PowerApps, please check the following article:

Filter function

If function

 

Best regards,

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thanks a lot, it worked like charm

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,360)