web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Color change per item ...
Power Apps
Answered

Color change per item in a dropdown list or second column text depending of an item

(0) ShareShare
ReportReport
Posted on by 113

Hi, 

 

Thanks for your help in advance. So I have a collection: 

ClearCollect(ColorCollection; Sequence(100;0;1)). It contains numbers for 0 to 99, but I want to change the color of the value if this value is already present on a column named ATA that contains some numbers from 0  to 99 (ATA is a column where some values could be repetitive, so I use :

Distinct(Sort('Attachement digitalisation (test)'; ATA); ATA)

So, for exemple, if 0 exists on the list, I want the same value on the list Sequence from 0 to 99 to be on a different color (for exemple in red instead of black), indicating this value it's already on the list. But I was doing some research and apparently, you can not change a value individually. So If this is not an option, maybe adding a combobox with two columns and when the value on the sequence list matches the one on the ATA column, a text will show on the second column of the combobox like "this value has several records". I do not want a gallery, since this will not allow me to have the format I want.

Categories:
I have the same question (0)
  • Verified answer
    Akser Profile Picture
    1,546 Moderator on at

    Hi @PowerAppsMx,

     

    Do you mean something like this?

    ClearCollect(
     ColorCollection,
     AddColumns(
     Sequence(
     100,
     0,
     1
     ),
     "Note",
     If(
     Value in 'Attachement digitalisation (test)'.ATA,
     "This value has several records"
     )
     )
    )
  • fatimaandrea Profile Picture
    113 on at

    Thank you

     

  • Verified answer
    fatimaandrea Profile Picture
    113 on at

    Hi, I put it on the combo box with the following formula on Items : 

    If(DDaction.SelectedText.Value="Ajouter"; ColorCollection ;Distinct(Sort('Attachement digitalisation (test)'; ATA); ATA)) and using your formula on the collection and it worked, thanks ! PowerAppsMx_1-1706537935577.png

     

  • Verified answer
    fatimaandrea Profile Picture
    113 on at

    So what I did was to create two collections: 

    ClearCollect(
        ColorCollection;
        AddColumns(
            Sequence(
                100;
                0;
                1
            );
            "Note";
            If(
                Value in 'Attachement digitalisation (test)'.ATA; "";
                "Sans enregistrements"
            )
        )
    );;

    ClearCollect(ColorAll;AddColumns(Distinct(Sort('Attachement digitalisation (test)'; ATA); ATA); "Note1"; If(
                Value in 'Attachement digitalisation (test)'.ATA; " ";
                "0 enregistrements trouvés"
            )
        )
    )
    Then, I added a combo box with the following formula on Items: 
    If(DDaction.SelectedText.Value="Ajouter"; "Rechercher une ATA"; DataTable1.Selected.ATA)
    And I chose the option to add two columns. When I click on ADD I know if there are records (or not) and when I click on modify, I only get the records.
     PowerAppsMx_1-1706542647327.png

     

     PowerAppsMx_0-1706542575452.png

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 401 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard