Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Changing color based on data exist or not in sharepoint list

Posted on by 36

Hi I have a sharepoint list as mentioned below

Mahesh005_0-1687806844153.png

In Power apps i have Cell id combox and a button as below

Mahesh005_1-1687807020248.png

my scenario is to change button color as yellow when if there is a  date in Actual start date i.e. not empty.

 

Any help is appreciated.

 

Thanks

Mahes

  • TimmeyNL Profile Picture
    TimmeyNL 7 on at
    Re: Changing color based on data exist or not in sharepoint list

    @Mahesh005 

    What do you have as source for your items?
    It should be a reference to your sharepoint list, datatype table (in this case, my list is called Client):

    TimmeyNL_0-1687808944162.png

     

  • Mahesh005 Profile Picture
    Mahesh005 36 on at
    Re: Changing color based on data exist or not in sharepoint list

    Hi,

     

    I have Combobox values as follows

    Mahesh005_2-1687808804537.png

     

     

  • Ami K Profile Picture
    Ami K 15,656 on at
    Re: Changing color based on data exist or not in sharepoint list

    @Mahesh005 - assuming the Items property of your Combo Box is the data source, apply the below to the Fill property of your Button.

     

     

     

    If(
     IsBlank(
     LookUp(
     'Your Data',
     Title = Your_ComboBox.Selected.Title',
     'Actual Date'
     )
     ),
     Color.Yellow,
     Color.Blue
    )

     

     

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

  • Mahesh005 Profile Picture
    Mahesh005 36 on at
    Re: Changing color based on data exist or not in sharepoint list

    hi @TimmeyNL , @madlad 

     

    I have Cell id in combo box. so Actual start date is not coming

    Mahesh005_0-1687808562905.png

    Thanks,

    Mahesh

  • TimmeyNL Profile Picture
    TimmeyNL 7 on at
    Re: Changing color based on data exist or not in sharepoint list

    Hi @Mahesh005 

    You can reference the combobox's not visible field in combination with the Fill of the button.

    If(Not(IsBlank(combobox.Selected.ActualStartDate)), RGBA(56, 96, 178, 1),RGBA(10,10,10,1))

  • madlad Profile Picture
    madlad 2,637 on at
    Re: Changing color based on data exist or not in sharepoint list

    In the button's fill, you could use IsBlank(YourComboBox.Selected.ActualStartDate, Color.Yellow, Color.Blue)

     

    hope this helps!

     

  • Mahesh005 Profile Picture
    Mahesh005 36 on at
    Re: Changing color based on data exist or not in sharepoint list

    hi @Amik ,

    no. it's just a individual button and a individual combo box. i just need color changing logic either it can be button or a lable.

     

    Thanks,

    Mahesh

  • Ami K Profile Picture
    Ami K 15,656 on at
    Re: Changing color based on data exist or not in sharepoint list

    Hi @Mahesh005 ,

     

    Is the Combo box and Button on a Form control?

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,487

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,014

Leaderboard