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 / Validation on Text Inp...
Power Apps
Answered

Validation on Text Input field inside a galley control

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I have an app where I have added a gallery control and inside the gallery I have added few text boxes. I want to apply mandatory field validation on these text boxes (for each row of gallery control). I want to run this validation the click of "Save" button.

Can some one please tell me how can I achieve that?

Note: Screenshot attached of my app.

 

Thanks

Saksham

tempsnip.png
Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,923 on at

    Your information on what control you want to validate is not clear but try;

    On the displaymode of the button:

    If(IsBlank(Textbox1.Text) Or Dropdown1.Selected=IsBlank (), DisplayMode.Didabled,DisplayMode.Edit)

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

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi,

     

    This didn't worked for me, as I want to enable the save button when all rows inside gallery control has a value else save button should be disabled.

     

    Thanks

    Saksham

  • eka24 Profile Picture
    20,923 on at

    What are the names of your controls and how many are they. The structure of the formula I gave is ok. Jus give the names.

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

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

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

    Hi @Anonymous ,

     

    Try to put the following code to App.OnStart property and the OnChange property of TextInput1 and TextInput2 inside the gallery.

     

    Clear(BlankField);ForAll(Gallery2.AllItems, If(IsBlank(TextInput1.Text)|| IsBlank(TextInput2.Text),Collect(BlankField, true)));

     

    Then, set the DisplayMode property of Save button as follows:

     

    If(true in BlankField,DisplayMode.Disabled,DisplayMode.Edit)

     

     

    Save Button is enabled only when all text boxes 1 and 2 in the gallery are filled in.

    Hope this helps.

    Sik

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks, this works perfectly fine ! 😊

  • Gelos Profile Picture
    457 on at

    Thanks for this. but it will not work when type . after type I have to click anyplace then it will work how it achieve input box on change trigger after type.

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
Haque Profile Picture

Haque 85

#2
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard