cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NigelP
Level 8

Selecting a Cell and Highlighting it in a Gallery

Hi

 

I have a gallery which has a a series of rows, one for each record.

Within each row I have a series of fields.

If a user clicks on a field, the OnSelect event fires.

THe user has requested that they want confirmation they have clicked on that field by that field being highlighted.

How can I do this ?  I can highlight a Row by the ThisIte,.IsSelected property, but what about an individual field ?

 

Thanks

 

Nigel

5 REPLIES 5
panand99
Level 10

Re: Selecting a Cell and Highlighting it in a Gallery

Hi @NigelP 

 

On the "Row", is it lables in galley or field?

 

NigelP
Level 8

Re: Selecting a Cell and Highlighting it in a Gallery

HI @panand99 

 

Each "Row" contains a series of fields.

 

If it would be easier if each "Row" was a series of Labels, that can be arranged.

 

REgards

 

Nigel

Community Support Team
Community Support Team

Re: Selecting a Cell and Highlighting it in a Gallery

Hi @NigelP ,

Could you please share a bit more about your scenario?

Do you want to highlight the fields (Labels) within each item of your Gallery?

 

Based on the needs that you mentioned, I have made a test on my side, please take a try with the following workaround:3.JPG

 

4.JPG

Within the Gallery, set the OnSelect proeprty of the Field1 (Label1) to following:

Select(Parent);Set(CurrentSelectedField, "Field1")

set the Color property of the Field1 (Label1) to following:

If(ThisItem.IsSelected && CurrentSelectedField = "Field1",RGBA( 220, 20, 60, 1 ), RGBA(0, 0, 0, 1))

set the OnSelect proeprty of the Field2 (Label2) to following:

Select(Parent);Set(CurrentSelectedField, "Field2")

set the Color property of the Field2 (Label2) to following:

If(ThisItem.IsSelected && CurrentSelectedField = "Field2",RGBA( 220, 20, 60, 1 ), RGBA(0, 0, 0, 1))

 

set the OnSelect proeprty of the Field3 (Label3) to following:

Select(Parent);Set(CurrentSelectedField, "Field3")

set the Color property of the Field3 (Label3) to following:

If(ThisItem.IsSelected && CurrentSelectedField = "Field3", RGBA( 220, 20, 60, 1 ), RGBA(0, 0, 0, 1))

...

...

Similar formulas for other Fields in your Gallery.

 

The GIF screenshot as below:Test.gif

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

 

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.
NigelP
Level 8

Re: Selecting a Cell and Highlighting it in a Gallery

Hi @v-xida-msft 

 

I tried this for border of cell and got the screen enclosed.

 

You will notice I got the status column row rather than just the selected cell.

 

I got the red backgroud by using your formula on the Fill Property.

 

Is it possible to find out what column has been selected. ?

 

Effectively I want to create a Excel type of effect.

 

Regards

 

Nigel

 

Community Support Team
Community Support Team

Re: Selecting a Cell and Highlighting it in a Gallery

Hi @NigelP ,

Currently, there is no direct way to find out what column has been selected within your Gallery.

 

As an alternative solution, I think the solution I provided could achieve your needs. You could consider store the column name into a variable when you click the column in your Gallery.

E.G. set the OnSelect proeprty of the Status Label in your Gallery as below:

Select(Parent);Set(CurrentSelectedField, "Status")

set the Fill property of the Status Label to following:

If(ThisItem.IsSelected && CurrentSelectedField = "Status", RGBA( 220, 20, 60, 1 ), RGBA(0, 0, 0, 1))

...

...

then you could know which column you selected in your Gallery through the CurrentSelectedField variable.

 

Please consider take a try with above solution, then check if the issue is solved. If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been solved.

 

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.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 163 members 5,552 guests
Please welcome our newest community members: