cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
normmsnpoweruse
Helper IV
Helper IV

Vertical Gallery Filter

How would you edit this to show a power app gallery where DepartmentStatus Sharepoint listcolumn is "Active"

 

ForAll(
    Distinct(
        'Table Service',
        Title
    ),
    LookUp(
        'Table Service',
        Title = Result
    )
)

 

7 REPLIES 7
WarrenBelz
Super User
Super User

Hi @normmsnpoweruse ,

The code you posted goes around in a  bit of a circle - you only need the Distinct Value of Title - to Filter

Distinct(
   Filter(
      'Table Service',
      DepartmentStatus.Value = "Active"
   ),
   Title
).Result

 

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.

Visit my blog Practical Power Apps

Not working, I am getting an error incompatible types: Table, Text

@normmsnpoweruse ,

Depends where you are using that - it will produce a Table of the distinct values and would normally be used as the Items of a drop-down/combo box.

 

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.

Visit my blog Practical Power Apps

normmsnpoweruse
Helper IV
Helper IV

How would you change this to sort the results in ascending order?

 

ForAll(
    Distinct(
        'Table Service',
        Title
    ),
    LookUp(
        'Table Service',
        Title = Result
    )
)

 

@normmsnpoweruse ,

You just need to wrap that in a Sort on the field in the table you want to sort on (you did not specify the field)

Got it

ForAll(
    Distinct(Sort(
        'Table Service',
        Title), Ascending
    ),
    LookUp(
        'Table Service',
        Title = Result
    )
)

Finally, got it.

ForAll(Sort( Distinct( 'Table Service', Title), Result).Result , LookUp( 'Table Service', Title = Result ) )

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,819)