cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Richard95
Helper I
Helper I

Help with inline color in Gallery

Hello good day, I ask you a question, is it possible to define a two-color for a gallery of records, that is, I have 4 records and I would like to have a white color and another medium gray so that the user can detect the difference between the two records and what be so that white is interspersed with gray depending on whether the records grow or not.

I would appreciate it if you could help me

1 ACCEPTED SOLUTION

Accepted Solutions
6 REPLIES 6
zmorek
Community Champion
Community Champion

Do you mean like banded rows, where one row is one color, and the next row is another color, alternating?

 

Assuming the rows have sequential IDs (i.e. nothing has been deleted from the data source), you can use this on the TemplateFill property of a gallery:

 

If(Mod(ThisItem.ID,2)=0,White,GhostWhite)

Richard95
Helper I
Helper I

I have a sql view that brings back logs.

 

if I meant a band of rows with a different color

Drrickryp
Super User
Super User

@Richard95 

In the TemplateFill property of the gallery, If(ThisItem.IsSelected, LightGrey, White)

You can also have different colors depending on a field in the records, something like

Switch(ThisItem.Status, "Active", Red,"Inactive", Grey, "Pending", Coral)

ok this works, but I would like to have the stripes that do not depend on a record, I want the first record to be loaded to be white and the second to be light gray and from then on continue interspersed one white and one gray

Drrickryp
Super User
Super User


could you help me to integrate

 

SortByColumns(

Search(
[@'[dbo].[APP_Nipon]'];
TextSearchBox1.Text;
"BodegaEntrada";
"BodegaSalida";
"DescItem"
);
"Numero";
If(
SortDescending1;
Ascending;
Descending
)
)

 

this code with this new

With(
{
records:'[dbo].[APP_Nipon]'
};
ForAll(
Sequence(CountRows(records));
Patch(
Last(
FirstN(records;Value));
{rowNumber: Value}
)
)
)

 

 

Helpful resources

Top Solution Authors
Top Kudoed Authors
Users online (3,985)