v8.0
If the value for the {attribute} in a custom display is null, the query renders the word undefined on the browser, instead of simply leaving it blank.

undefined.png

undefined.png

4 days later

Yes, this is an inconvenience that is, unfortunately difficult to fix. Use the following workaround.

If, for example, you are displaying an attribute called Name in a custom query:
<div>{Name}</div>

use the following instead:

if (data["Name"]) {

<div>{Name}</div>

}

# if (data["Docket_Comments"]){#<span class="text-primary">{Docket_Comments}</span>#}

Thank you but the code didn't work for me. Invalid template error.
I've tried placing the code in the scripts section as well.

udfnerror.png
udfnerror2.png

Same result on the browser.

Carriage returns and spaces before/after # are important. It has to be:

if (data["Docket_Comments"]){

<span class="text-primary">{Docket_Comments}</span>

}

not

if (data["Docket_Comments"]){#<span class="text-primary">{Docket_Comments}</span>#}

Thanks, adjusted. No luck.

udfnerror4.png

Result is everything within the body template has been hidden. Only the header is visible and the template body border.
Invalid template error.

udfnerror3.png

Sorry, my bad, forgot the closing # at the end of the last line:

if (data["Docket_Comments"]){

<span class="text-primary">{Docket_Comments}</span>

}

7 years later