cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dogbural
Helper I
Helper I

error message when missing information

Hi,

 

I am trying to put an error message when the text is missing. 

 

UpdateContext({varInitialBlankError:
If(IsBlank(Int_Text.Text),true,false)});

If(varInitialBlankError,Notify("Please enter initial",NotificationType.Error), Patch(ColTryagain, ThisItem,{blowholecheck :Blow_Tog.Value, visualinspection:Visual_Tog.Value, dent_x002c_damage:Dent_Tog.Value, Initial:Int_Text.Text}));


Collect(ColTryagain, {Initial:""})

 

 

With the above, I wished that the boarder line is highlighted in red and "Please enter initial" label pops up when clicking "Save" button.

 

I have 3 issues 

 

Issue 1. Red line and error message are already shown even before clicking "Save" button. Is it possible for them to be active upon clicking?

Screen Shot 2021-09-25 at 2.01.06 am.png

Issue 2. Even though the text is not entered and error is still shown, once I click the "Save" button, it creates a next row. How can I set the button such that it creates next row only if the text is entered?

 

Issue 3. When creating 3rd new row (for example) and the text is not entered, followed by clicking "Save" button, red boarder line and error message are displayed in all rows.

Screen Shot 2021-09-25 at 2.04.43 am.png

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
StalinPonnusamy
Community Champion
Community Champion

Hi @dogbural 

 

Please let us know if anything needs on your post. We can help with this.


Please do not forget to give kudos if you find the suggestion helpful or Accept it as a solution if works fine to help other users to find it useful.

 

View solution in original post

2 REPLIES 2
StalinPonnusamy
Community Champion
Community Champion

Hi @dogbural 

 

1. Label Control

Set Visible property of Label (Error Message) to 

IsBlank(Int_Text.Text)

2. Create New Item - After Save (Means when text found)

 

If(IsBlank(Int_Text.Text),Notify("Please enter initial",NotificationType.Error), Patch(ColTryagain, ThisItem,{blowholecheck :Blow_Tog.Value, visualinspection:Visual_Tog.Value, dent_x002c_damage:Dent_Tog.Value, Initial:Int_Text.Text});
Collect(ColTryagain, {Initial:""})
);

 

StalinPonnusamy
Community Champion
Community Champion

Hi @dogbural 

 

Please let us know if anything needs on your post. We can help with this.


Please do not forget to give kudos if you find the suggestion helpful or Accept it as a solution if works fine to help other users to find it useful.

 

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,293)