cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Saan
Helper III
Helper III

gallery - text input filed

Hello all,

 

I have a gallery called vendor. and am filtering with current user login. and one more text input field called comments.

 

in that gallery hardly i get 5 rows for each user login.

 

can i make comments (text input field ) is mandatory for ?

 

i can see the required option for the input field.

 

Any help is much appreciated!!!

 

Thanks,

 

Saan

1 ACCEPTED SOLUTION

Accepted Solutions
eka24
Super User III
Super User III

If you are to submit or patch your data to your datasource, then:
On the Visible property of the SubmitButton, put this formula :
If(CountRows(Filter(Gallery3.AllItems, IsBlank(CommentTextbox))) > 0, false,true)
This will make the commentTextbox field inside the Gallery mandatory.
That is until they fill the comments field , they can not submit the data.
Please replace commentTextbox with the actual name of your comment field.
You can also follow this tread:

https://powerusers.microsoft.com/t5/Building-Power-Apps/How-do-I-hide-a-button-if-data-in-a-gallery-...

If you like this post, give a thumbs up. Where it solved your issue, Mark as a solution

View solution in original post

8 REPLIES 8
KennethNicasens
Resolver III
Resolver III

Hello Saan,

 

You can add a label to your gallery that will display if the value is blank, this label can be invisble:

Text:
IsBlank(txtinputComment.Text)

Visible:
false

 

Then you can check this label and set the DisplayMode of the button to continue:

DisplayMode:
If(CountRows(Filter(GalleryVendors.AllItems,checkCommentIsBlank.Text = "false")) = CountRows(GalleryVendors.AllItems),DisplayMode.Edit,DisplayMode.Disabled)

 

Hope this helps.

Am unable to catch you, please correct me the above is the solution for the same for the scenario like below:

i need to make required the below three input fields of comments section.

powerapp3.png

 
 

thanks,

Saan

Any help is much appreciated ..!!!

 

Thanks,

Saan

If they fill this in, I assume they need to submit it all with a button?

eka24
Super User III
Super User III

If you are to submit or patch your data to your datasource, then:
On the Visible property of the SubmitButton, put this formula :
If(CountRows(Filter(Gallery3.AllItems, IsBlank(CommentTextbox))) > 0, false,true)
This will make the commentTextbox field inside the Gallery mandatory.
That is until they fill the comments field , they can not submit the data.
Please replace commentTextbox with the actual name of your comment field.
You can also follow this tread:

https://powerusers.microsoft.com/t5/Building-Power-Apps/How-do-I-hide-a-button-if-data-in-a-gallery-...

If you like this post, give a thumbs up. Where it solved your issue, Mark as a solution

View solution in original post

Hi @eka ,

I would not suggest to use the visible property. As I mentioned above you can use the same like formula on the DisplayMode of the button. This way the user has an indication of what he needs to do.

That's alright. Thank you

Thank you .. It worked 🙂

 

Saan.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

Top Solution Authors
Top Kudoed Authors
Users online (50,921)