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

Multible Filters in an If Statment

Hey all, 

I have a Problem with a  Filter Statement for my Gallery.

I filter the Gallery in this way, if the rows StandortGeändert and Vertragbeendet are false show these items in my Gallery, if a serial Number is selected use this as additional filter.

 

If(
    IsBlank(drpCMGallerySeriennummer.Selected),
        Filter(Umfuhrauftraege, StandortGeaendert = false && Vertragbeendet = false),
        Filter(Umfuhrauftraege, StandortGeaendert = false && Vertragbeendet = false && Seriennummer = drpCMGallerySeriennummer.Selected.Seriennummer)
)

 

until now everythings works fine:

KaiW76_0-1632406863898.png

But know comes my problem, the customer wants a additional filter in this part of my app, 

if the Empfänger is a special customer I have to look to ab other column in my table if it is blank.

If it is blank the column should be invisible, if it is not blank the dataset has to be visible.

The next problem is that I work in a SharePoint list and have delegation errors, if I use the wrong opperators.

 

Thanks for your held in advance.

 

Kai

1 ACCEPTED SOLUTION

Accepted Solutions

HI @KaiW76 ,

This is a logic more than a coding exercise, but I think the below should be close

With(
   {
      wList:
      Filter(
         Umfuhrauftraege,   
         !StandortGeaendert && !Vertragbeendet
		 
         (
            Len(drpCMGallerySeriennummer.Selected.Seriennummer) = 0 ||,
            Seriennummer = drpCMGallerySeriennummer.Selected.Seriennummer
         )
      )
   },
   Filter(
      wList,
      !IsBlank(Empfänger) &&
	  Kunde <> "Warehouse &&
	  (
	     Kunde <> "WareHouse" && 
             !IsBlank(SW)
      ) 
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

HI @KaiW76 ,

I do not quite understand the additional filter(you might explain in a bit more detail), but using the premise that the column is not blank (the not operator is not delegable), the below would be delegable providing the top filter returns record numbers under your (500-2000) Delegation limit.

With(
   {
      wList:
      Filter(
         Umfuhrauftraege,   
         !StandortGeaendert && !Vertragbeendet  &&
         (
            Len(drpCMGallerySeriennummer.Selected.Seriennummer) = 0 ||,
            Seriennummer = drpCMGallerySeriennummer.Selected.Seriennummer
         )
      )
   },
   Filter(
      wList,
      !IsBlank(Empfänger)
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

 

Hey @WarrenBelz

let me try to explain it better. My problem with the additional filter is that it has a dependency.
The corresponding records should only be displayed if the column "Kunde" contains the value "Warehouse" and the column "SW" contains a value. Only in this case should the next department see the list entry.

 

I forgot one thing, if the column "Kunde" is not "Warehouse", the dataset has to be visible in the Gallery.

 

Thanks for your help in advance.

 

 

HI @KaiW76 ,

This is a logic more than a coding exercise, but I think the below should be close

With(
   {
      wList:
      Filter(
         Umfuhrauftraege,   
         !StandortGeaendert && !Vertragbeendet
		 
         (
            Len(drpCMGallerySeriennummer.Selected.Seriennummer) = 0 ||,
            Seriennummer = drpCMGallerySeriennummer.Selected.Seriennummer
         )
      )
   },
   Filter(
      wList,
      !IsBlank(Empfänger) &&
	  Kunde <> "Warehouse &&
	  (
	     Kunde <> "WareHouse" && 
             !IsBlank(SW)
      ) 
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

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,253)