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 A Warning Mess...
Power Apps
Answered

Display A Warning Message When A Condition Is Met

(0) ShareShare
ReportReport
Posted on by 71

Hey Guys,

To start with, I have a gallery which displays my SharePoint list. It has a column called "category". I want a warning message to be displayed whenever "Mileage" & "Fuel" are both in the "category" column of the gallery. I've looked at this problem for hours, and I have no idea how to tackle it.

I would appreciate any help I am given. Thanks!

Categories:
  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @FranzCarson3 ,

    What type is your category column in Sharepoint ?

    If it is a single line of text,

    put a Label control inside the gallery with your warning message as Text property and set the Visible property to:

    ThisItem.category="Mileage" || ThisItem.category="Fuel"

    In this way for all the records with category "Mileage" or "Fuel" the label with the warning message will be visible.

    Is this what you want to achieve ?

     

     

  • FranzCarson3 Profile Picture
    71 on at

    @gabibalaban 

    My column type in SharePoint is a Choice column. I am hoping that whenever "Mileage" and "Fuel" are in the gallery, it displays a pop-up. The pop-up wouldn't be in the gallery itself. I would use the Set() function to display a pop-up if the condition is met.

    I was wondering if there was a way to implement an If() statement into it. 

  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    Well ... I think i understand

    You should try to set Visible property of your pop-up to:

    "Mileage" in Gallery.AllItems.TheLabelDisplayingCategoryColumn.Text || 

    "Fuel " in Gallery.AllItems.TheLabelDisplayingCategoryColumn.Text

  • Verified answer
    FranzCarson3 Profile Picture
    71 on at

    @gabibalaban 

    I was playing around with it, and I came up with this:

    If(
    "Mileage" in Concat(
    Gallery1.AllItems,
    Category.Value
    ) && "Fuel" in Concat(
    Gallery1.AllItems,
    Category.Value
    ),
    Set(
    Warning,
    true
    )
    )

     

    This is what worked for me. I appreciate your help!

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard