Signature is being converted to text

Hi all,

Per the below image, I have a PDF sent out via workflow that is converting one of my signature images into the text url showing where the signature is located. The template expression for the broken signature is relatively simple:

<<switch([Employee Refusal],
TRUE,“EMPLOYEE REFUSED”,
switch([Employee Available],
TRUE,[Employee Signature],“EMPLOYEE UNAVAILABLE”)
)>>

The expression works correctly in that it ends up with the appropriate link, but I suspect I need to enforce the correct data type within the formula. I am unsure how to do this for images or signatures, does anyone have any advice? I might just be missing something simple. The supervisor signature works normally but is a simple <<[Supervisor Signature]>> and does not have an expression yet.

image

All of the possible values returned by SWITCH() must be of a compatible type. I’m not sure how it decides which type is then expected, but in this case, it seems to expect a textual type, and so forces the Signature value to Text. You’ll have to find another way to approach this. Consider:

<<If: AND(NOT([Employee Refusal]), [Employee Available])>>
<<[Employee Signature]>>
<<EndIf>><<If: OR([Employee Refusal], NOT([Employee Available]))>>
<<IFS(
  [Employee Refusal],
    “EMPLOYEE REFUSED”,
  NOT([Employee Available]),
    “EMPLOYEE UNAVAILABLE”
)>>
<<EndIf>>

This article may help https://help.appsheet.com/en/articles/2737886-template-image-thumbnail-drawing-and-signature-display

I tried your expression several different ways but I keep getting the below error:

image
Appears to be missing << and >>?

I don’t think so, I’ve copied it verbatim and tried playing with the formatting quite a bit, something is throwing it off but I can’t figure it out.

image

I’ve made a minor change in the template I posted above. Try the new version and let me know.

I figured it out! Apparently the next <<If: has to start on a new line. I changed the format to:

<<If: AND(NOT([Employee Refusal]), [Employee Available])>>
<<[Employee Signature]>>
<<EndIf>>
<<If: OR([Employee Refusal], NOT([Employee Available]))>>
<<IFS(
[Employee Refusal],
“EMPLOYEE REFUSED”,
NOT([Employee Available]),
“EMPLOYEE UNAVAILABLE”
)>>
<<EndIf>>

After I moved that to a new line I received the error for the missing on the employee signature, regardless, it works as intended now. Thanks for the help! This conversation also led me to the template specific IF expressions page which I had not seen before, these will be very useful.

4 Likes