cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MalekA
Frequent Visitor

Filter Choices

Hi Guys,

Can anyone explain how to do filter choices to my SharePoint table where I need to filter only the active program instead of all programs , where I added to the program Codes column using site contents two choices active or Inactive.

 Now all data appear when I dropdown the list.

Many Thanks in advanced

2 ACCEPTED SOLUTIONS

Accepted Solutions

Hi @MalekA :

Could you tell me what Program_x0020_Code's data type is?Lookup?Choices?

Please try this solution:

set the Item's property to:

 

Filter(
    Choices([@'Demo CC Usage'].Program_x0020_Code),
    Value in Filter('Program Codes','Active Program'='Active Program').Code
)

 

Or

Filter(

    Choices([@'Demo CC Usage'].Program_x0020_Code),

    Value in Filter('Program Codes','Active Program'='Active Program').Title

)

Best Regards,

Bof

View solution in original post

hi @v-bofeng-msft 

Thanks for your help , to solve the problem I have created a new collection called 'programStatus' that can read the Program Code columns 

Collect(programStatus,ShowColumns('Program Codes',"Active","Title"))

And for the requested field I did filtering 

Filter(programStatus,Active.Value="Active")

 

Thanks again for ypur help

 

View solution in original post

8 REPLIES 8
mdevaney
Super User
Super User

@MalekA 
Put this code in the Items property of your dropdown instead.

Filter('Program Codes', 'Active Program'="Active Program").Code


---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

MalekA
Frequent Visitor

Thanks for replaying me,

I just want to let you know that my table name in SHAREPOINT is Demo CC Usage and there is a column named Program Code and a pic will be attached for that column (Capture 4).

there are two option active or inactive and I need to filter the active only.

And If you please open the another attached pic (Capture 5) to see the item property to my form field.

thanks again.

Hi @MalekA :

Could you tell me what Program_x0020_Code's data type is?Lookup?Choices?

Please try this solution:

set the Item's property to:

 

Filter(
    Choices([@'Demo CC Usage'].Program_x0020_Code),
    Value in Filter('Program Codes','Active Program'='Active Program').Code
)

 

Or

Filter(

    Choices([@'Demo CC Usage'].Program_x0020_Code),

    Value in Filter('Program Codes','Active Program'='Active Program').Title

)

Best Regards,

Bof

View solution in original post

Hi again,

First thanks for replying me but I've got an error message and please if you have any suggestion to help.

Many thanks 

@MalekA 
PowerApps does not recognize 'Program Code' or 'Active Program'.  You might have mistyped in the SharePoint list name with or you did not connect the SharePoint list to your app.

 

   

 

Hi @MalekA :

I strongly agree with @mdevaney .Please check if you connect the SharePoint list('Program Codes') to your app.

Best Regards,

Bof

v-bofeng-msft
Community Support
Community Support

Hi @MalekA :

Has the problem been solved?

Is there anything else I can help?

If the post is helpful, please consider accepting it as a solution to help others

Best Regards,

Bof

hi @v-bofeng-msft 

Thanks for your help , to solve the problem I have created a new collection called 'programStatus' that can read the Program Code columns 

Collect(programStatus,ShowColumns('Program Codes',"Active","Title"))

And for the requested field I did filtering 

Filter(programStatus,Active.Value="Active")

 

Thanks again for ypur help

 

View solution in original post

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,230)