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

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
Highlighted
Frequent Visitor

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
Highlighted
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. 

Highlighted
Frequent Visitor

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

Highlighted
Frequent Visitor

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,981)