cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
oappdev
Level 8

Validation on Submit

Happy Thursday Power Apps Community!

 

 

Question 1: What is the best approach to validate the following required fields without breaking the ForAll ( ) function

 

  • Requestor Name
  • Address
  • Facility

Here is the formula l'm using for the OnSelect ( ) [ Submit ]

 

ForAll(Gallery1.AllItems, Patch('Pitney Bowes',Defaults('Pitney Bowes'),Form2.Updates,{Category: TextInput2.Text},{SubCategory: TextInput3.Text},{ProductName: TextInput4.Text},{Quantity: TextInput4_1.Text},{Price:Value(Price)}))

 

 

ScreenShot1.PNG

 

Part Question 2:

l'm using the following formula  for OnSelect ( ) function. i want the second the user type a alphabetic to prompt them "Only Numbers are allow".

 

If(!IsMatch(TextInput_Quantity.Text, "\d+"),Notify("Quantity must be a number", NotificationType.Error);Reset(TextInput_Quantity))

 

 

ScreenShot2.PNG

Thank you so much in advance.

 

Have a great and successful day ahead

 

1 ACCEPTED SOLUTION

Accepted Solutions
oappdev
Level 8

Re: Validation on Submit

I was able to figure the Validation on submit 😀

 

Here is the formula. Hope it helps anyone out 👍

 

If(!Form2.Valid,SubmitForm(Form2),ForAll(Gallery1.AllItems, Patch('Pitney Bowes Order', Defaults('Pitney Bowes Order'),Form2.Updates,{Category: TextInput1.Text},{SubCategory: TextInput1_1.Text},{ProductName: TextInput1_2.Text})))

 

Just need to figure the regular expression

View solution in original post

2 REPLIES 2
oappdev
Level 8

Re: Validation on Submit

I was able to figure the Validation on submit 😀

 

Here is the formula. Hope it helps anyone out 👍

 

If(!Form2.Valid,SubmitForm(Form2),ForAll(Gallery1.AllItems, Patch('Pitney Bowes Order', Defaults('Pitney Bowes Order'),Form2.Updates,{Category: TextInput1.Text},{SubCategory: TextInput1_1.Text},{ProductName: TextInput1_2.Text})))

 

Just need to figure the regular expression

View solution in original post

oappdev
Level 8

Re: Validation on Submit

Scratching my head. The [ ADD ] button enable when all 3 drop-down are selected. Trying to figure how to enable the [ ADD ] button when they input the quantity amount and all 3 drop-down are selected.

 

Dropdown

DisplayMode: If(IsBlank(drpCategory.Selected.Result) || IsBlank(drpSubCategory.Selected.Result) || IsBlank(drpProductName.Selected.Result),Disabled,Edit) 

Quantity

BorderColor:If(Not(IsMatch(txtQuantity.Text, "\d*"))&&!IsBlank(txtQuantity.Text),RGBA(255,0,0,1),RGBA(0,18,107, 1)) 

 

 

 

Thank you in advance

ScreenShot3.PNG

 

 

 

 

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,949)