Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

vbscript find if a field value exists

Hi everyone

I need some help with vbscript.

Is there a way to find if a value of a field from my database exists also in qlikview document.

I want to create a buuton which search in qlikview doc and finds a specific field value.

Could anyone help me?

5 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Use the FieldIndex() for finding whether a value exists in the field in Qlikview.

Regards,

Jagan.

Not applicable
Author

Could you please write me the syntax cause I cannot find it.

Thanks in advance

jagan
Luminary Alumni
Luminary Alumni

Hi,

Please check the example

Returns value >0, if 'John Doe' exists in Name field.

fieldindex( 'Name', 'John Doe' )

Regards,

Jagan.

Not applicable
Author

Sorry for the inconvenience but I get an error

I have a field: CustomerId and a variable which I get it from the DB: dbCustomerId

I write variable=ActiveDocument.FieldIndex("CustomerId", dbCustomerId )

and i get the error: Object doesn't support this property or method: 'ActiveDocument.FieldIndex'

What I do wrong?

jagan
Luminary Alumni
Luminary Alumni

Hi,

This is a qlikview method, not VBScript method.

Please find the attachment for solution, hope this what you are searching.

Regards,

Jagan.