How to detect NULL/EMPTY value then replace with STRING?

Top of the morning to all.

Is it possible to detect NULL/EMPTY value from a certain field and then replace with some STRING?

I tried this to no avail:



Dim myData as String = document.field("Document Section 1\typeID").Value
If myData is Nothing Then myData = "1" Else myData = myData


Advise?

Was this article helpful?

0 out of 0 found this helpful

Comments

1 comment

  • Avatar
    Jakarta Development
    Seems to work


    Dim getData as String = document.field("Document Section 1\WHAT_FIELD").Value


    If (String.IsNullOrEmpty(getData)) Then


    getData = yourstring


    End If


    0

Please sign in to leave a comment.