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

Validate that Gallery has items before submitting

Already got the required fields validation working for 

  •  Requestor Name
  • Address
  •  Facility Name

 

What is the best approach to also validate that gallery must has an item added. Before the user could submit.

 

If(!Form2.Valid,SubmitForm(Form2),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(TextInput4_2.Text)}));Office365Outlook.SendEmail("ofuentes@convivasolutions.com","New Order","Pitney Bowes"; HtmlText1.HtmlText, { IsHtml: true });Navigate('Finish Screen'))

 

Hope l explain clearly 

Gallery.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Validate that Gallery has items before submitting

Use an IF() to check whether CountRows(Gallery.AllItems) > 0.  



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
Dual Super User
Dual Super User

Re: Validate that Gallery has items before submitting

Use an IF() to check whether CountRows(Gallery.AllItems) > 0.  



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

oappdev
Level 8

Re: Validate that Gallery has items before submitting

Winner winner chicken dinner! Thanks a million @Pstork1 

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 (5,153)