Hi, is there any way for an image field to sh...

expressions
(Alfredo Pou) #1

Hi, is there any way for an image field to show an alternative text if there is no image assigned, for a mail template? Specifically, I want to put a header in a report, which shows the client’s logo, but if the client did not upload an image, it shows the text with the name. Try putting an IF in the template, but type error. “Errors”: “Error: Workflow rule ‘Garantía’ field ‘Attachment’ expression ‘if(isblank([Logo]),[Vendedor],[Logo])’ is invalid due to: IF function is used incorrectly:the second input (if-result) and third input(else-result) should have the same type… Error: Workflow rule ‘Garantía’ field ‘Body’ expression ‘if(isblank([Logo]),[Vendedor],[Logo])’ is invalid due to: IF function is used incorrectly:the second input (if-result) and third input(else-result) should have the same type…”,

(Philip Garrett) #2

@Alfredo_Pou

Try:

IF(ISNOTBLANK([Logo],[Logo]),[Vendedor])

(Alfredo Pou) #3

@Philip_Garrett_Appsh This puzzles me even more! Reversing the order did not give an error! I would like to understand why? Since the error indicated difference of data types, and they are still different, image and text. On the other hand, although it did not give an error, the text comes out with an image format (as if it were a link that leads to a non-existent image) and is not seen in the attached pdf. The same result as when I put the IF in the app formula of the image.

(Philip Garrett) #4

@Alfredo_Pou

You are right, you avoid the syntax error, but it does not do what you want.

I am sorry but I am not aware of a way to do what you want.

Hopefully someone else has a better suggestion.

(Alfredo Pou) #5

No problem. Thank you anyway! I have the doubt: I made a syntax error? What would be the error?

(Aleksi Alkio) #6

<<[Logo]>><<IFS(ISBLANK([Logo],[Vendor])>> will do the trick :slight_smile: