Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Detecting if a field is defined in VBScript?

I'm trying to detect if a field is defined in a document in a VBScript macro but I don't see any obvious predicate or test to do so.

For example, if I retrieve a field like this:

set kaboom = ActiveDocument.Fields("DOESNOTEXIST")

Then kaboom is not null, is not empty and is an object.

So would do I test if ActiveDocument.Fields returns a real field in the document?

Thanks,

Andrew Warinner

2 Replies
m_woolf
Master II
Master II

Maybe you can use the system field $Field.

Not applicable
Author

Yes, that looks like it will do the trick.

Thanks!

AW