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 / Display message when a...
Power Apps
Answered

Display message when a value is selected

(0) ShareShare
ReportReport
Posted on by 12
Hi everyone! I'm new to Power Apps, and I am trying to edit an existing app to add a message to the user when a certain value is selected in a field. The field is populated with the choices from a dropdown column in a SPO list and is in the app as a combo box. In the OnSelect properties, I have put the following:
 
If(DataCardValue7.Selected.Value= "Bereavement",
 Notify("Full-time employees are eligible for 3 paid days, 24 hours, of bereavement leave for immediate family members and 2 unpaid days, 16 hours, for non-immediate family members."))
 
However, after saving and publishing the change, nothing happens when the value of 'Bereavement' is selected on the form. I had tried previously to add it as a Tooltip, but no matter what I changed in the formula, I always received some type of error, even with the formula provided by Copilot as a 'fix'.
 
What am I missing here?
 
Deanne
Categories:
I have the same question (0)
  • DR-13121520-0 Profile Picture
    12 on at
    I finally got this to work, somehow. But now, when the form loads, there is an error message at the top:
     
    'Incorrect argument type, expected a number.'
     
    The good news is that the message which needs to be displayed when 'Bereavement' is selected shows up. Just not sure about this new error. Items can still be submitted with the form, without errors, and goes through all the appropriate approval/communication actions. I just don't understand the new error. Nothing is flagged in Power Apps as an error, just when the form loads via SharePoint.
  • Verified answer
    Pstork1 Profile Picture
    69,026 Most Valuable Professional on at
    A couple suggestions to change.
    1) Do in in the OnChange rather than the OnSelect
    2) use Self. to reference the combobox instead of the datacard name.
    3) Add the notification type to the Notify()
     
    The following code worked for me.
    If(Self.Selected.Value1 = "Item 4",Notify("test",NotificationType.Information),false)

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • Verified answer
    WarrenBelz Profile Picture
    154,496 Most Valuable Professional on at
    Try putting the code OnChange rather than OnSelect.
    If(
       Self.Selected.Value = "Bereavement",
       Notify(
          "Full-time employees are eligible for 3 paid days, 24 hours, of bereavement leave for immediate family members and 2 unpaid days, 16 hours, for non-immediate family members."
       )
    )
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    Buy me a coffee
  • DR-13121520-0 Profile Picture
    12 on at
    Thank you, Warren and Paul! That simplifies the expression and displays the message as intended. Now, I just have to figure out why it is popping up with 'Incorrect argument type, expected a number.' Everything works...I think the gremlins are messing with me!
     
    Deanne 
  • Pstork1 Profile Picture
    69,026 Most Valuable Professional on at
    The error may be happening because you aren't supplying the NotificationType of the message in the Notify() function.  Take another look at the code I posted.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 529 Most Valuable Professional

#2
Haque Profile Picture

Haque 230

#3
Kalathiya Profile Picture

Kalathiya 217 Super User 2026 Season 1

Last 30 days Overall leaderboard