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 / How to show warning/er...
Power Apps
Answered

How to show warning/error when text input field is mandatory when a specific dropdown option is selected, for all rows in gallery?

(0) ShareShare
ReportReport
Posted on by 45

I have a gallery control in my app which shows item details from a sharepoint list.

In my gallery I have a dropdown and a text input field. When ''abc'' option is selected from drop down Text input field is  marked as red. I also have a validate button which validates if all rows which have ''abc'' option selected, doesnt have blank text input field, if there is a text input field which is blank and have ''abc'' option selected in dropdown then it will show warning.

But right now, my current formula only shows warning for ine row in gallery but not for all rows.

Please explain how I can modify my formula to validate all rows?

ForAll(
Gallery3_1.AllItems,
If(
Dropdown3_1.Selected.Value = "Keep same" && IsBlankOrError(comm_1.Text) ,
Notify(
"Please fill in all required fields",
NotificationType.Error
)
)
);
Notify(
"Validated!",
NotificationType.Success
)

 

Thanks in advance!

Categories:
I have the same question (0)
  • Verified answer
    Mitanshu Profile Picture
    1,650 Moderator on at

    Outside your gallery, create a label with warning message.

    Under the visible property of the label - if the value of formula below is 0, then put visibility as true

     

    CountIf(
     Gallery1.AllItems, 
     Dropdown1.Selected.Value = "Keep same" && IsBlank(txtInput1.Text) 
    )

     

    You will have to change the control names to actual name of your controls

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If this post or my previous reply was useful in other ways, please consider giving it 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

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard