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

Color TemplateFill from Excel value

Hi everyone,

 

I'm looking today to have the TemplateFill in gallery depending of excel table value.

 

In my gallery I browse this table :

Table CR.jpg

 The column "Spectacle" is filled by value from this table : 

Table spectacles.jpg

 

And on the last table I made Column with the color designed (theses colors are coming from somes other files and are the same for all the company)

I want to have the templatefill in the Gallery as the colors wrote in this table.

pages interventions.jpg

 

I find how to change color with switch function but, I have some gallery, and I case of change colors or add colors, I need to change all of theses. That's what I want to do it automatically if it's possible. 

 

Maybee someone as an idea  of which formula use to do this.

 

Thank's for all, and have a good day.

 

1 ACCEPTED SOLUTION

Accepted Solutions
bcharpentier
Frequent Visitor

Hi Everyone,

 

I found the exact formula to do this : 

 

RGBA(LookUp(liste_spectacle;Spectacles=ThisItem.Spectacle).spectacle_couleur_rouge;LookUp(liste_spectacle;Spectacles=ThisItem.Spectacle).spectacle_couleur_vert;LookUp(liste_spectacle;Spectacles=ThisItem.Spectacle).spectacle_couleur_bleu;LookUp(liste_spectacle;Spectacles=ThisItem.Spectacle).spectacle_couleur_opacite)

 

Many thank's to show me the way.

 

Have good day 🙂

View solution in original post

5 REPLIES 5
C-Papa
Super User
Super User

Hi, assuming PowerApps recognises it as a colour (when you over over the RGB vale a colour appears) then you just need the change the fill in the gallery to ThisItem.[ColumnName]. I have not done this with Excel but have with SharePoint and it works as expected. You need the make sure the RGBA value is written exactly the same as when a colour is manually selected in PowerApps. It might be that when the data is collected it store it as text, in this case just add the number part of the colour to the excel and for the fill property add RGBA(ThisItem.[ColumnName])

@C-Papa ,

This is not working for me, and also I could be work if the colors and all values are in the same table, but I'm not in this case.

Thank's anyway for your answer

In that case you will need to create a connection to the table with the colours in and do a lookup within PowerApps to match the correct colour to the correct item. For this to work you need something in both tables that indexes the colour to the item. 

@C-Papa ,

I thinking to this way, but I don't know how to make this connection. I have the same Index as nommed Spectacle.
With the Lookup fonction I can find a table type, but I need to extract only a value in the Color columns.

Also in Fill formula, I can't have access to external value.

 

Thnak's for reply 🙂

bcharpentier
Frequent Visitor

Hi Everyone,

 

I found the exact formula to do this : 

 

RGBA(LookUp(liste_spectacle;Spectacles=ThisItem.Spectacle).spectacle_couleur_rouge;LookUp(liste_spectacle;Spectacles=ThisItem.Spectacle).spectacle_couleur_vert;LookUp(liste_spectacle;Spectacles=ThisItem.Spectacle).spectacle_couleur_bleu;LookUp(liste_spectacle;Spectacles=ThisItem.Spectacle).spectacle_couleur_opacite)

 

Many thank's to show me the way.

 

Have good day 🙂

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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