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 of controls...
Power Apps
Answered

Validation of controls in Gallery

(0) ShareShare
ReportReport
Posted on by 5

I need to validate the control as required in Gallery couldn't make formula work for all rows. Please suggest the way to validate control for required value in each row and on what event it can work best when I add more rows on click of a button?

Categories:
  • Verified answer
    mdevaney Profile Picture
    29,993 Moderator on at

    @ishani_m 
    I suggest you read this thread I responded to earlier in the week.  The other person was having exactly the same questions as you and we got it solved.


    Link to post:
    https://powerusers.microsoft.com/t5/Building-Power-Apps/Gallery-message-if-one-item-does-not-meet-certain-conditions/m-p/619478#M195828

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @ishani_m ,

    Could you describe more clearly about the detailed Validation for the gallery?

    How do you set the gallery?

    If you want to Validate statically for each rows, you could directly use AddColumns function in the gallery items.

    The AddColumns function adds a column to a table, and a formula defines the values in that column. Existing columns remain unmodified.

    The formula is evaluated for each record of the table.

    Here's a doc about this function for your reference:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-table-shaping

     

    If you want the Validation be triggered by a button, you could insert a label inside the gallery.

    Use formula about Match function  and use "ThisItem.fieldname". It will evaluated for each record of the table.

    Set the label's Text like this:

    If(var,Match(...))

     Set the button's OnSelect:

    Set(var,true)

    Then when you click the button, the label will display the validation result.

    Here's a doc about Match function for your reference:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-ismatch

     

     

    Best regards,

  • ishani_m Profile Picture
    5 on at

    @mdevaney I could reuse your method to make validation work in my case, on click of button. Thanks for the hrlp.

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 350 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 318

#3
Mohsin Ali Profile Picture

Mohsin Ali 220

Last 30 days Overall leaderboard