<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Chaining checking for initialization in Ivy Script</title><link>https://answers.axonivy.com/questions/890/chaining-checking-for-initialization-in-ivy-script</link><description>&lt;p&gt;In the Ivy Designer Guide, Chapter 7, section Null handling / Automatic object creation, it states&lt;/p&gt;
&lt;p&gt;You can to use the .# operator to suppress the automatic object creation. &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;if( in.#customer == null)
{
  // object is null
}

if (in.#customer is initialized)
{
  // object is not null or has been set to a non-default value
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I also discover that we can do a chain of suppresing initialization like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;if (in.#bigDataClass.#smallerDataClass.#smallDataClass.#tinyDataClass.#fieldXyz is initialized) {
    // Reach here if all of the properties are initialized
} else  {
   // Reach here if any of the properties are null
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This really reduces the verbosity of the code when I want to check a deep structure of data classes. Despite its usefulness, I cannot find any (Ivy) documentation mentioning about this feature. I only discovered it by chance and have been using it until now.&lt;/p&gt;
&lt;p&gt;My question is whether this is an official feature but has been forgotten to mention or it is an unofficial/hidden feature and could be dropped in the future?&lt;/p&gt;
&lt;p&gt;Thanks &amp;amp; Regards&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/890/chaining-checking-for-initialization-in-ivy-script" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 04 Aug 2014 15:59:51 -0400</lastBuildDate><item><title>Answer by Christian Strebel</title><link>https://answers.axonivy.com/questions/890/chaining-checking-for-initialization-in-ivy-script/891</link><description>&lt;p&gt;The .# operator works always also if chained. So that is an official feature.
I will add another sample to the documentation which will show that.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Christian Strebel</dc:creator><pubDate>Mon, 04 Aug 2014 15:59:51 -0400</pubDate><guid>https://answers.axonivy.com/questions/890/chaining-checking-for-initialization-in-ivy-script/891</guid></item></channel></rss>