コミュニティ

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?

この記事は役に立ちましたか?

0人中0人がこの記事が役に立ったと言っています

コメント

1件のコメント

  • Avatar
    Permanently deleted user
    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

サインインしてコメントを残してください。