Questions Tagged With auto-initializationhttps://answers.axonivy.com/tags/auto-initialization/?type=rssquestions tagged <span class="tag">auto-initialization</span>enMon, 04 Aug 2014 11:35:59 -0400Chaining checking for initialization in Ivy Scripthttps://answers.axonivy.com/questions/890/chaining-checking-for-initialization-in-ivy-script<p>In the Ivy Designer Guide, Chapter 7, section Null handling / Automatic object creation, it states</p> <p>You can to use the .# operator to suppress the automatic object creation. </p> <pre><code>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 } </code></pre> <p>I also discover that we can do a chain of suppresing initialization like this:</p> <pre><code>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 } </code></pre> <p>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.</p> <p>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?</p> <p>Thanks &amp; Regards</p>Genzer HawkerMon, 04 Aug 2014 11:35:59 -0400https://answers.axonivy.com/questions/890/chaining-checking-for-initialization-in-ivy-scriptivyscriptauto-initialization