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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Changing color of the ...
Power Apps
Unanswered

Changing color of the circle according to the value of the column in a Collection

(0) ShareShare
ReportReport
Posted on by

Hi All!

When I try to evaluate a column condition of a collection to change the color of a circle, it doesn't work ...

Any idea how to refer to the collection?

Image.jpg

 

 

Thanks in advance

 

Regards

S

 

 

Categories:
I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,989 Moderator on at

    @Kepcla 

    PowerApps is having trouble understanding which row in the collection you want to check.  I believe you want it to look at the first one.  Replace DaysFinal.Item1 with the code below in both places.

     

    First(DaysFinal).Item1

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Verified answer
    KennethNicasens Profile Picture
    275 on at

    Hi Kepda,

     

    You're changing the color based on the collection, does this only contains 1 item?

    If yes: Power Apps does not know this and will check on the whole table which he can't determine if the value is "vacation".
    You can solve this by using First(DayFinal).Item1

     

    If this is not the case, you will have to find a workaround.
    Can you provide a little more detail about the app?

     

    Kind Regards,

    Kenneth Nicasens

  • Kepcla Profile Picture
    on at

    the "items1" column could be vacations or work:

    Collection.jpg

  • mdevaney Profile Picture
    29,989 Moderator on at

    @Kepcla 

    Yes, that's true.  But you cannot simply check to see if Items1 is equal to vacations or work because there are several rows and PowerApps doesn't know which row to check.

     

    Which row do you want to check?

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Kepcla Profile Picture
    on at

    Actualy all (Item1)....maybe ForAll function could work...

  • KennethNicasens Profile Picture
    275 on at
    Kepla,

    Can you give a bit more context of the use of this functionality.

    ForAll will loop over each item and will do an action(s) within this loop.
  • Kepcla Profile Picture
    on at

    Thanks to All,  "First" function works!

  • Kepcla Profile Picture
    on at

    Sorry clumsiness!!😥

    Is not working...

    First function just evaluate the 1st record...

    I tried LookUp, Filter, ForAll, and not luck...

    My brain is hanging upside down😖

  • KennethNicasens Profile Picture
    275 on at

    Can you give a bit more context of the use of this functionality?

    You can create a gallery with each item and color the circle in for each record.
    Or do you want to check if there is 1 vacation within the list? Then you can use the following formula: If(Empty(Filter(colName, item1 = "vacation")),RGBA(),RGBA())
  • Kepcla Profile Picture
    on at

    I think it´s little more complicated, it´s a circle in a calendar.

    The circle is visible according to the date column in the collection, (DateAdd(_firstDayInView,ThisItem.Value,Days) in DaysFinal.StartDate1) This code works OK..

    But I need to paint with a color X the circle according to the item, and that is the problem...

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard