DotNet variable has not been instantiated - Node is null

LouisLouis Member Posts: 78
edited 2015-08-31 in NAV Three Tier
Dears
I'm processing an XML doc in NAV2013BETA

<Title> is defined as DotNet variable : System.Xml.XmlNode

If <Title> contains a value then no problem ; but...
In C/AL when the SelectSingleNode returns null the Node Variable is not instantiated.

title := items.Item(i).SelectSingleNode('category/text()');

How to test a DOTNET null value in C/AL ?

TIA
L

Answers

  • deV.chdeV.ch Member Posts: 543
    Try ISNULL() Function
  • LouisLouis Member Posts: 78
    ?
    I think that ISNULL() is not a C/AL function, even in NAV2013...
    I'm only looking for a C/AL function.

    Regards,
    L
  • LouisLouis Member Posts: 78
    SOLVED - Thanks.

    IF ISNULL(title) THEN ...
    works perfectly but function is not yet documented in NAV help.

    Regards,
    L
  • casanovacasanova Member Posts: 194
    i'm not familiar in dotnet
    but i want to use com object from dotnet
    how do i declare my keyid?
    is it as a CODE type?
  • mdPartnerNLmdPartnerNL Member Posts: 802
    isn't the ISCLEAR() function doing the same?
  • davmac1davmac1 Member Posts: 1,283
    FYI - the isnull function works with dotnet in NAV2009R2 as well.
    I am using dotnet to read fields in unpredictable order. To make it easier to upgrade in the future, I decided to use dotnet.
    Thanks for the tip. :D :thumbsup:
Sign In or Register to comment.