cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Witham
Level: Powered On

Conditional Fill in Gallery

Hi

I am pretty new to Powerapps but I am buliding a stocktaking app to scan a QRCode and upload the data to a share point list. I have a button to perform the OnScan process of adding the data to a collection but part of the gallery is a textbox for inputting quantity.

I have been trying to get the fill colour of this box to be dependant on there being a value so have used:

if(len(manualqty.text)=0,Red, Green)

To format the box however as soon as the button is pressed to scan another QRCode the colour becomes green.

I have also tried IsBlank without success and can't really understand why it will not work so any help would be great,

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Witham
Level: Powered On

Re: Conditional Fill in Gallery

Hi

 

I think I have solved it, all I needed to do was set the default property of the manualqty to blank() and each time the button added a record the if statement could run successfully.

View solution in original post

3 REPLIES 3
Super User
Super User

Re: Conditional Fill in Gallery

Is manualqty the field in your list, your collection or on the screen?  Be sure you are using the name of the textinput box within your gallery.  The way I typically do this is:  If(IsBlank(Textinput1.Text),Red, Green).  That will change the color of the box as soon as there is data entered into the box for that row of the gallery.  

Fill.jpg

 

I have not done QR Input, but make sure your button is set to apply the new inputs to the next row of your gallery, rather than writing over the existing row which may reset the value in the box to blank somehow. 

Witham
Level: Powered On

Re: Conditional Fill in Gallery

Hi

Thank for the reply, the manualqty is the name of the textbox and the app works by a scan button so on scan it enters another record into the gallery.

The isblank works great if I press the scan button muliple times without inputting anything, I think you are right with the button properties, what I need to do is apply the default blank to each row as the button adds it.

Any idea how I check this property an change it??

 

Thanks

Witham
Level: Powered On

Re: Conditional Fill in Gallery

Hi

 

I think I have solved it, all I needed to do was set the default property of the manualqty to blank() and each time the button added a record the if statement could run successfully.

View solution in original post

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

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