cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Fields Required for All Gallery Items

Hi there, 

 

I have an application that sends meeting invites from a gallery (image below).  In the example below there are 12 items in the gallery, which will create 12 meeting invites in Outlook.  I am trying to disable the button until ALL of the values for the specified fields in the gallery are completed.  I am using the code below but it only applies to the 1 row and not the subsequent 11.  Any ideas on how to disable the submit button until the end user fills out 'TextInput1' and 'To_Box' for all gallery items and not just the first row?

 

 

Button DisplayMode = 
If(IsBlank(TextInput1) || IsBlank(TO_Box)
,Disabled, Edit)

 

RachelPalya1_0-1610596628206.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Hi @RachelPalya1 ,

Try this - free-typed, but I think it is close to what you need.

If(
   CountRows(YourGalleryNames.AllItems) =
   CountRows(   
      Filter(
         YourGalleryName.AllItems,
         !IsBlank(TextInput1.Text) && !IsBlank(TO_Box.Text)
      )
   ),
   DisplayMode.Edit,
   DisplayMode.Disabled
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

3 REPLIES 3
Super User III
Super User III

Hi @RachelPalya1 ,

Try this - free-typed, but I think it is close to what you need.

If(
   CountRows(YourGalleryNames.AllItems) =
   CountRows(   
      Filter(
         YourGalleryName.AllItems,
         !IsBlank(TextInput1.Text) && !IsBlank(TO_Box.Text)
      )
   ),
   DisplayMode.Edit,
   DisplayMode.Disabled
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

I had to switch around the Edit and Disabled but it worked!! You rock, thank you so much!

Helper II
Helper II

I havent tested this but you can try.

Insert a label (label1)and hide it later inside the gallery.

Label1 text property: if(isblank(textinput1.text),0,1)

Next on your submit button display mode property...

If(sum(gallery.allitems,label1.text)=countrows(gallery.allitems), edit,disabled)

 

 

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (8,275)