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

New to PowerApps

I have a set of requirements to build an idea capture application. 

I want to know if it is possible to create buttons to change the views of the library.

Please see the PDF attached, the category controls should filter the library to display items only related to that category, the All button will clear the filter, this task was given to me as a learning opportunity as we are moving away from InfoPath to PowerApps.

Please direct me to the study materials i need to complete my project. I am currently reviewing PowerApps tutorials but I haven't come across anything that can help me with my project.

Lets start with a specific question, how to create a dynamic buttons and can we change the view of the library upon clicking any one of them.

Thanks

Roy

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @RoyGad ,

Could you please share a bit more about your scenario?

Do you want to filter your Gallery items based on the Category control button you pressed?

 

Based on the needs that you mentioned, I think a Global variable could achieve your needs. I have made a test on my side, please consider take a try with the following workaround:

Set the OnSelect property of the "All" button to following:

Set(CurrentCategory, Blank())

Set the OnSelect property of the "Solving problems" button to following:

Set(CurrentCategory, "Solving problems")

Set the OnSelect property of the "Competitor Study" button to following:

Set(CurrentCategory, "Competitor Study")

 

Set the Items property of the Gallery to following:

Filter(
         'YourDataSource',
          If(
             IsBlank(CurrentCategory),
             true,
             CategoryColumn = CurrentCategory
          )
)

Note: The CategoryColumn represents the column in your data source to store the Category value, e.g. "Solving problems", "Competitor Study", ... etc.

 

If the data source you used is a SP List, and the CategoryColumn is a Choice type column, please modify above formula as below:

Filter(
         'YourDataSource',
          If(
             IsBlank(CurrentCategory),
             true,
             CategoryColumn.Value= CurrentCategory
          )
)

 

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

 

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

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup

More details about the Filter function usage in PowerApps, please check the following video resource:

https://www.youtube.com/watch?v=nlhWQg03TL0

 

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

4 REPLIES 4
rebeccas
Community Champion
Community Champion

If you are wanting to filter what is seen and you have a column that has the different "Types" (as an example). You can then have in the gallery to the left, when the select an item it says which "Type" the item they selected is going to show by setting a variable like OnSelect=UpdateContext({showItem:"Referral"}) and then the gallery to the right filters for any that have a type of "Referral". 

 

You have to think through what all you need to control when laying out your data source for this type of stuff. 

 

I'm not sure if this helps with what you are needing to do, but I hope so. Look up some stuff on the UpdateContext({}), I use it in some way in every app I do. 

RoyGad
Frequent Visitor

Thank you

I now have somewhere to start from.

Regards

Roy

v-xida-msft
Community Support
Community Support

Hi @RoyGad ,

Could you please share a bit more about your scenario?

Do you want to filter your Gallery items based on the Category control button you pressed?

 

Based on the needs that you mentioned, I think a Global variable could achieve your needs. I have made a test on my side, please consider take a try with the following workaround:

Set the OnSelect property of the "All" button to following:

Set(CurrentCategory, Blank())

Set the OnSelect property of the "Solving problems" button to following:

Set(CurrentCategory, "Solving problems")

Set the OnSelect property of the "Competitor Study" button to following:

Set(CurrentCategory, "Competitor Study")

 

Set the Items property of the Gallery to following:

Filter(
         'YourDataSource',
          If(
             IsBlank(CurrentCategory),
             true,
             CategoryColumn = CurrentCategory
          )
)

Note: The CategoryColumn represents the column in your data source to store the Category value, e.g. "Solving problems", "Competitor Study", ... etc.

 

If the data source you used is a SP List, and the CategoryColumn is a Choice type column, please modify above formula as below:

Filter(
         'YourDataSource',
          If(
             IsBlank(CurrentCategory),
             true,
             CategoryColumn.Value= CurrentCategory
          )
)

 

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

 

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

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup

More details about the Filter function usage in PowerApps, please check the following video resource:

https://www.youtube.com/watch?v=nlhWQg03TL0

 

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

You guys saved my life, I am on it. I will make more attempts and if i am stuck i will let you know.

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 (1,781)