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 / Icon Visibility in a D...
Power Apps
Answered

Icon Visibility in a DataCard in a DetailForm

(0) ShareShare
ReportReport
Posted on by 22

Hello,

 

Here is what I am looking to accomplish, when a date is less than today, I want a specific icon to only be visible then. For example, if today is 7/26, and the date the them item coming in shows 7/22, I want the Mail icon to appear so it can be clicked to email our inventory team. Am I better off trying to accomplish it this way OR having the icon stay visible but only be clickable IF the date is passed today?

 

Below is what I am doing/tried and screenshots.

 

So I have a 2 screen app. The datasource is a sql database. The 2nd screen is the DetailForm. Inside that DetailForm there are DataCards. One of them is the 'Expected_date' card. I placed the Mail icon there names 'IconMail'. Right now I have that date set to change to a red color if less than today, so now I just want that icon to only appear when when less than today. I tried to set the Icon visible property to If(ThisItem.Expected_date < Today() and I also tried ThisItem.Expected_date < Today() but those formulas don't work. I also tried this: If(ThisItem.Expected_date < Today(), true, false) but icon still appears no matter what.

 

Any help is greatly appreciated!!! 

SP_Newbie_0-1690379943735.pngSP_Newbie_1-1690380050786.png

 

 

SP_Newbie_2-1690380108331.png

 

Categories:
  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @SP_Newbie ,

     

    Firstly, your second and third formulas are correct, but I find that the column name you use in If is Expected_date, and it is Expected Date in your DetailForm. So I recommend you to check the column name in the data source, Because that's probably why the second and third formulas were failed.

     

    Second, I recommend that you use the first method to set up Email Icon, and there is a solution. if you want to click on the Email Icon, you can change the Form to EditForm firstly and set the Display mode to View for everything in the Form except the Email Icon. Then you can set the Visible property as above and set the DisplayMode property like this:

    If(ThisItem.'Expected Date'<Today(),DisplayMode.Edit)

     

    I hope you found these helpful.

     

    Best regards,

    Rimmon Li

  • SP_Newbie Profile Picture
    22 on at

    Hello Rimmon,

     

    Thank you for your reply. I still am not getting the Mail Icon to just appear when the date has already passed. 

    I verified that DataField is in fact 'Expected_date' from our sql database. I tried placing the formula you suggested and placed it in the DisplayMode property as you suggested (with the correct 'Expected_date', but no luck). 

     

    SP_Newbie_0-1690484301371.png

     

  • Verified answer
    v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @SP_Newbie ,

     

    Could you please create a separate Label to show me the 'Expect_Date'?

     

    It seems that your data is correct, there is a possibility that 'Expected_Date' is text type or something else in your database, then you may need to convert it to date type first.

     

    Set the Visiable property of Email Icon like this:

    DateValue(ThisItem.Expected_Date)<Today() 

     

    Set the DisplayMode property like this:

    If(DateValue(ThisItem.Expected_Date)<Today(),DisplayMode.Edit)

     

    Best regards,

    Rimmon Li

  • SP_Newbie Profile Picture
    22 on at

    Wish I could say it worked, but it didn't - thank you for trying. There is something that is off and making it not work, as needed. I have put this part of my app on the backburner until I go back to it. Thank you for trying to assist @v-mengmli-msft 

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
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard