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

Meeting Capture: how to change circle3 fill color or background color for selected tasks in TaskGallery gallery?

Hi, everyone. By default, TaskGallery items that get selected for editing in the HomeScreen don't visually change, so users are unsure if they've really been selected. I'd like to change the fill color of the gallery's circle3 item and/or change the background color of the selected gallery item when a user clicks or presses that item to edit it.

 

What I've tried:

 

I've tried toggling circle3 between 2 colors using this:

 

UpdateContext({ toggleValue: !toggleValue }

 Which does alternate background colors when pressed or clicked, but doesn't actually change whether the gallery item has been selected. If you click it, it's always selected until you click another gallery item, but the color of circle3 doesn't change because circle3 isn't aware of whether another circle3 has been pressed. That's clearly not the right way.

 

There must be a simple way to visually indicate that a TaskGallery item has been selected for editing. Your thoughts on this are appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User II
Super User II

Re: Meeting Capture: how to change circle3 fill color or background color for selected tasks in TaskGallery gallery?

Hi @pafdev,

 

The OnSelect for Circle3 should be:
Select(Parent)

 

I'm not sure why it's not working with yours, do you have more than one task?

 

I pasted the exact formula I gave you into the Fill for Circle3 in a brand new App and after adding two tasks I could immediately see that it worked:
image.png

 

It's worth noting that the First item in a Gallery is selected by default, so if you only had one task then yes the circle would remain red as its the only task and IsSelected.

 

Could you please share a screenshot of it not working?

 

Thanks!

Sancho


@iAm_ManCat

Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

5 REPLIES 5
Highlighted
Super User II
Super User II

Re: Meeting Capture: how to change circle3 fill color or background color for selected tasks in TaskGallery gallery?

Heya!

 

Circle3's Fill:

If(
   ThisItem.IsSelected,
   // Selected Item Colour
   RGBA(255,  0,  0, 1),
   // All other unselected items
   RGBA(120,120,120, 1)
)

 

You could then do a similar thing for a rectangle shape the size of your gallery item template size (and sen to the back so that it's behind all other items) with dimensions:
x,y,width,height: (0, 0, Parent.TemplateWidth, Parent.TemplateHeight)

Fill is as above formula for Fill but whatever colour you need for SelectedItem background

 

Because we are using ThisItem.IsSelected, the value is always contextual and will only work for the one selected item in that gallery.

Is that what you were looking for?

 

Hope this has been helpful! Happy to discuss more if you need more than the above,

 

Cheers,

Sancho


@iAm_ManCat

Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Highlighted
Frequent Visitor

Re: Meeting Capture: how to change circle3 fill color or background color for selected tasks in TaskGallery gallery?

Hi @iAm_ManCat, and thanks for the reply. I've tried sticking your suggested snippet in both the OnSelect and Fill formulas for circle3, but when I do either, the button simply stays red all the time whether it's pressed or not. I tried with a fresh and unadulterated version of Meeting Capture to be sure and got the same result. What am I doing wrong?

Highlighted
Super User II
Super User II

Re: Meeting Capture: how to change circle3 fill color or background color for selected tasks in TaskGallery gallery?

Hi @pafdev,

 

The OnSelect for Circle3 should be:
Select(Parent)

 

I'm not sure why it's not working with yours, do you have more than one task?

 

I pasted the exact formula I gave you into the Fill for Circle3 in a brand new App and after adding two tasks I could immediately see that it worked:
image.png

 

It's worth noting that the First item in a Gallery is selected by default, so if you only had one task then yes the circle would remain red as its the only task and IsSelected.

 

Could you please share a screenshot of it not working?

 

Thanks!

Sancho


@iAm_ManCat

Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

Highlighted
Frequent Visitor

Re: Meeting Capture: how to change circle3 fill color or background color for selected tasks in TaskGallery gallery?

@iAm_ManCatThanks! The problem was indeed that I was testing with only a single task. Once I tested with more than one task, the toggling behavior worked as expected. Thank you, and keep being awesome.

Highlighted
Super User II
Super User II

Re: Meeting Capture: how to change circle3 fill color or background color for selected tasks in TaskGallery gallery?

You're welcome @pafdev!

 

Glad I was able to help 😺


@iAm_ManCat

Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,122)