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 / Textinput should not b...
Power Apps
Unanswered

Textinput should not be empty or should not contain special characters in gallery

(0) ShareShare
ReportReport
Posted on by

I have a time sheet application where in I'm trying to control text input behaviour where i need to check if comment(TextInput) section is empty i should not save time sheet higlighted fields are text inpputs in gallery need these field to be mandatory then only it shoud allow to submit 

PowerrangerM_0-1673959179479.png

 

 

Categories:
I have the same question (0)
  • Sanshubh Profile Picture
    512 on at

    Hello @Anonymous 

     

    For TextInput validation you can use IsMatch Function from this Link Here:
    https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-ismatch 

     

    write the validation code on one errormassage label Like this

     

    If(IsBlank(TextInput1.Text),"Enter Value in TextInput1",!IsMatch(TextInput1.Text, "[a-zA-Z0-9-]"),"Please Enter Proper Value in TextInput1")

     

    and this code on visible property of errormassage label

     

    If(IsBlank(TextInput1.Text) || !IsMatch(TextInput1.Text, "[a-zA-Z0-9 ]"),true,false)

     


    To disable and enable the submit button write this code on Display Mode property of submit button

     

    If(ErrorMsg.Visible,DisplayMode.Disable,DisplayMode.Edit)

     

     

  • Community Power Platform Member Profile Picture
    on at

    Thanks for the reply @SanshubhLubal  however i want it across rows this will not work ,and my submit button is outside of gallery .

  • Sanshubh Profile Picture
    512 on at

    I don't get it.
    Across the rows??

  • BideyYusuf Profile Picture
    387 on at

    Hi @Anonymous what @SanshubhLubal explained will work for you, at the point when you are creating the record (When you select NEW form)

     

    But when you said across row, do you mean, you have a gallery that works like Excel??... is that what you have? 

     

    please elaborate, so that we can understand how to help you further.

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard