cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

HOW TO NOT SHOW A SPECIFIC DATA INSIDE A HTML TEXT WHEN IS BLANK...

Hey guys, I need to not show data when a row is blank inside an HTML text...

 

 

Like this: 

 

IFISBLANKHTML.png

<td style='width: 213px;'>" &  "$ " & If(IsBlank("-";'Resumo Transporte Total')) &"</td>

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: HOW TO NOT SHOW A SPECIFIC DATA INSIDE A HTML TEXT WHEN IS BLANK...

@Gorilla_8 

Same thing:

"<tr>" & 
  Concat(MasterGalleryHTMLDADOS.AllItems; 
    If(IsBlank('Resumo Transporte Total'), "", 
       "<td style='color:#61033A;'> RESUMO TRANSPORTE </td>
       <td style='width: 213px;'>" & Text('Resumo Transporte Total'; "[$-pt-BR] $ #,00")) &
       "</td>"
       )
    )
 &
"</tr>"

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

34 REPLIES 34
Highlighted
Super User
Super User

Re: HOW TO NOT SHOW A SPECIFIC DATA INSIDE A HTML TEXT WHEN IS BLANK...

@Gorilla_8 

 

Try to change your formula to the following:

... "$ " & Coalesce('Resumo Transporte Total'; "-") & "</td>" ...

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
Post Prodigy
Post Prodigy

Re: HOW TO NOT SHOW A SPECIFIC DATA INSIDE A HTML TEXT WHEN IS BLANK...

@RandyHayes Thanks for the reply! 

 

But the PowerApps says "The 'Coalesce' function has some invalid arguments"

 

 

Highlighted
Super User
Super User

Re: HOW TO NOT SHOW A SPECIFIC DATA INSIDE A HTML TEXT WHEN IS BLANK...

@Gorilla_8 

Which argument is it complaining about?  You can put your pointer over each for more detailed information.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
Post Prodigy
Post Prodigy

Re: HOW TO NOT SHOW A SPECIFIC DATA INSIDE A HTML TEXT WHEN IS BLANK...

All the function

Highlighted
Super User
Super User

Re: HOW TO NOT SHOW A SPECIFIC DATA INSIDE A HTML TEXT WHEN IS BLANK...

@Gorilla_8 

It should give more specifics on the issue, but anyway...

 

What is 'Resumo Transporte Total'?

What context is this Html control in?  A gallery, a Screen, a Form?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
Post Prodigy
Post Prodigy

Re: HOW TO NOT SHOW A SPECIFIC DATA INSIDE A HTML TEXT WHEN IS BLANK...

A gallery data...

 

IFISBLANKHTML.png

Highlighted
Super User
Super User

Re: HOW TO NOT SHOW A SPECIFIC DATA INSIDE A HTML TEXT WHEN IS BLANK...

@Gorilla_8 

If 'Resumo Transporte Total' is in AllItems of the Gallery and it is a text field, then the formula provided - Coalesce('Resumo Transporte Total', "-")  - should work just fine.

If you take all the logic out and just put 'Resumo Transporte Total' in your Concat function/Html builder, do you get the results?  (i.e. take out your original If function and my Coalesce function and just put the field name in)

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
Post Prodigy
Post Prodigy

Re: HOW TO NOT SHOW A SPECIFIC DATA INSIDE A HTML TEXT WHEN IS BLANK...

Yes, I get the item on HTML editor, but I wanna show a "-" if is blank or not show the field.

 

 

Highlighted
Super User
Super User

Re: HOW TO NOT SHOW A SPECIFIC DATA INSIDE A HTML TEXT WHEN IS BLANK...

@Gorilla_8 

Yep, Coalesce will do the trick.

Are we having a comma vs semicolon issue?  I was reviewing your original posting and noticed you are using semicolon separation in your formulas...If that is the case, then my formula to you should have been:

Coalesce('Resumo Transporte Total'; "-")

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

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 (8,507)