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 / Validating input field...
Power Apps
Answered

Validating input fields in repeating tables PowerApps

(0) ShareShare
ReportReport
Posted on by 321

Hi,

 

I want to validate input field inside a repeating table. User should not be able to create a new line if the first some fields in the first line of item is blank and the save button should be disabled if any of the input field contains no value.validate.PNG

 

Categories:
I have the same question (0)
  • Verified answer
    TikshaAggarwal Profile Picture
    on at

    Hi @codeworks ,

    I'm assuming you are using gallery control here to edit grid.

    So, if you want to disable the Save button for selected item add the following code on DisplayMode property of Save icon

     

    If( ThisItem.IsSelected&&(IsBlank(TextInput2)||IsBlank(TextInput3)), DisplayMode.Disabled,DisplayMode.Edit)

     

     

    In case you are not using any gallery, you can add validation to Save button like following

     

    If(IsBlank(TextInput2)||IsBlank(TextInput3), DisplayMode.Disabled,DisplayMode.Edit)

     

     

    else option could be if you want to make button editable, notify user a message if validation doesn't meet by adding following code on onSelect property of button

     

    If(IsBlank(TextInput2)||IsBlank(TextInput3), Notify("Please fill required fields",NotificationType.Error),Patch(Datasource,Defaults(Datasource),{key:value}))

     

     

    Hope this helps,

     

    Please click Accept as solution if this helped you solve your issue. This will help others find it more readily. It also closes the item. Please consider giving it Thumbs Up.

     

  • codeworks Profile Picture
    321 on at

    Cool!!!. All your approaches works.. But what I observed is, once a new line item is added, the save button of the new line item will be enabled even with text input not having values.

  • TikshaAggarwal Profile Picture
    on at

    Then you also make sure to Reset the input controls you are using on Save button and on onVisible of screen

    Reset(Textinput)

     

  • codeworks Profile Picture
    321 on at

    Not accepting Reset as a formular table.PNG

    Its only the first line of item that have the save disabled. the new add new icon is clicked, the new item has save button enabled

  • codeworks Profile Picture
    321 on at

    Thanks once again, you code did solved the problem so i added the following code to the onSelect Property of Save Button:

    If(
     IsBlank(DrpPr) || IsBlank(txtqb) || IsBlank(txtqc),
     Notify(
     "Please fill required fields",
     NotificationType.Error
     ),
     Patch(
     MyCollection,
     ThisItem,
     {
     //My Values here
     }
     )
    )

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard