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.
WORKAROUND! Query custom display settings {attribute} value
WORKAROUND! Query custom display settings {attribute} value
- Attachments
-
- undefined.png (27.65 KiB) Viewed 11374 times
Last edited by Rennur on Wed Sep 27, 2017 12:45 am, edited 2 times in total.
-
- Posts: 7523
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
Re: v8 Query custom display settings {attribute} value
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, 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>
# }
Aware IM Support Team
Re: v8 Query custom display settings {attribute} value
Code: Select all
# if (data["Docket_Comments"]){#<span class="text-primary">{Docket_Comments}</span>#}
I've tried placing the code in the scripts section as well.
Same result on the browser.
-
- Posts: 7523
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
Re: v8 Query custom display settings {attribute} value
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>#}
# if (data["Docket_Comments"]){ #
<span class="text-primary">{Docket_Comments}</span>
# }
not
# if (data["Docket_Comments"]){#<span class="text-primary">{Docket_Comments}</span>#}
Aware IM Support Team
Re: v8 Query custom display settings {attribute} value
Thanks, adjusted. No luck.
Result is everything within the body template has been hidden. Only the header is visible and the template body border.
Invalid template error.
Result is everything within the body template has been hidden. Only the header is visible and the template body border.
Invalid template error.
-
- Posts: 7523
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
Re: v8 Query custom display settings {attribute} value
Sorry, my bad, forgot the closing # at the end of the last line:
# if (data["Docket_Comments"]){ #
<span class="text-primary">{Docket_Comments}</span>
# } #
# if (data["Docket_Comments"]){ #
<span class="text-primary">{Docket_Comments}</span>
# } #
Aware IM Support Team