<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Display NULL values in record set nicely in the RTable</title><link>https://answers.axonivy.com/questions/284/display-null-values-in-record-set-nicely-in-the-rtable</link><description>&lt;p&gt;I have a record set from a DB query that I want to use for display in a RTable. Some values can be &lt;code&gt;NULL&lt;/code&gt; and the result is that the RTable shows them like &lt;code&gt;java.lang.Object@1234&lt;/code&gt; which is not very useful information for the end user. &lt;/p&gt;
&lt;p&gt;How can I make this cell empty for the display?&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/284/display-null-values-in-record-set-nicely-in-the-rtable" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 28 Apr 2009 10:06:29 -0400</lastBuildDate><item><title>Answer by Tamas KIS</title><link>https://answers.axonivy.com/questions/284/display-null-values-in-record-set-nicely-in-the-rtable/286</link><description>&gt; Hallo Herr Groppe&lt;br/&gt;
&gt; &lt;br/&gt;
&gt; Es könnte 2 Gründe für diese Verhalten in Frage kommen. Entweder werden die Objekte als "nicht inizialisierte DB Objekte" ankommen (manche DB Systeme liefern solche Objekte anstatt "null"&lt;br/&gt;
&gt; oder wird ivy das Objekt über einen Komfort Feature (Kapitel IvyScript: "Null handling / Automatic object creation" in Designer Help) initialisiert. &lt;br/&gt;
&gt; &lt;br/&gt;
&gt; Auf  jedem Fall: ich würde folgenden Kode empfehlen:&lt;br/&gt;
&gt; &lt;br/&gt;
&gt; (record.getField("name") is initialized) ? record.getField("name") : "N.A."&lt;br/&gt;
&gt; &lt;br/&gt;
&gt; Freundliche Grüsse&lt;br/&gt;
&gt; T.Kis&lt;br/&gt;
&gt; &lt;br/&gt;
&gt; &lt;br/&gt;
&gt; P.S. Sie finden weitere Informationen über das Konstrukt "is initialized" in dem Kapitel "IvyScript".&lt;br/&gt;
&lt;br/&gt;
Hallo Herr Kis,&lt;br/&gt;
&lt;br/&gt;
danke für den Hinweis, mit dem vorgeschlagenen Code funktioniert es einwandfrei !&lt;br/&gt;
&lt;br/&gt;
Schöne Grüße&lt;br/&gt;
B. Groppe&lt;br/&gt;
&lt;br/&gt;
P.S. Wir verwenden MS SQL 2000</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tamas KIS</dc:creator><pubDate>Tue, 28 Apr 2009 10:06:29 -0400</pubDate><guid>https://answers.axonivy.com/questions/284/display-null-values-in-record-set-nicely-in-the-rtable/286</guid></item><item><title>Answer by Tamas KIS</title><link>https://answers.axonivy.com/questions/284/display-null-values-in-record-set-nicely-in-the-rtable/285</link><description>&lt;p&gt;Two reasons can cause this behavior. Either those NULL values are values that are not set in the DB (some DB's return NULL, some return an empty string or 0 depending on the column type) or you were using the &lt;a href="http://www.xpertivy.ch/releases/Xpert.ivy/latest/documents/DesignerGuideHtml/ivy.ivyscript.html#ivy.ivyscript.language.nullhandling"&gt;ivyScript auto initialization&lt;/a&gt; feature of Xpert.ivy.  &lt;/p&gt;
&lt;p&gt;You can use this expression to overcome the problem:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;(record.getField("name") is initialized) ? record.getField("name") : "N.A."&lt;/code&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tamas KIS</dc:creator><pubDate>Tue, 28 Apr 2009 10:02:01 -0400</pubDate><guid>https://answers.axonivy.com/questions/284/display-null-values-in-record-set-nicely-in-the-rtable/285</guid></item></channel></rss>