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

Gallery TextBox where If columnA is blank, show value from another columnB?

Hello,

 

I'm relatively new to PowerApps and after searching for a bit, I was unable to find the proper syntax for something I'm trying to achieve.  I have a SharePoint list I'm using for data that originated from an Excel sheet.  In short, I'm looking for a way to have a label within a gallery display a value from column b, only when column a is blank.  But if column a is not blank, i'd like to show that value from column a.  I know the following syntax is way wrong but this is atleast what I can come up with in my head to articulate what I'm trying to do:

 

Text= If(ThisItem.ColumnA.value)IsBlank,display(ThisItem.ColumnB.value), else display(ThisItem.ColumnA.value)

Thank you for the help!

1 ACCEPTED SOLUTION

Accepted Solutions
prajyot
Level: Powered On

Re: Gallery TextBox where If columnA is blank, show value from another columnB?

Add label in the gallery and make sure Visible=True and use the below formula to assign property value for label.Text

label.Text= If(IsBlank(ColumnA),ColumnB,ColumnA)

2 REPLIES 2
prajyot
Level: Powered On

Re: Gallery TextBox where If columnA is blank, show value from another columnB?

Add label in the gallery and make sure Visible=True and use the below formula to assign property value for label.Text

label.Text= If(IsBlank(ColumnA),ColumnB,ColumnA)

Highlighted
robinsc1
Level: Powered On

Re: Gallery TextBox where If columnA is blank, show value from another columnB?

Thank you very much @prajyot!

 

That did the trick!