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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
dmohanty
Partner - Specialist
Partner - Specialist

VBScript to JScript - Is it possible?

Hi All,

I have a piece of VBScript code which is used as a macro. Can somehow it be converted to JScript?

The reason being, in that space, a lot of other JScripts are running and both VBScript and JScript are not supported at same time.

Here is the VBScript below. Please help.

SUB SelectValues
SET Doc = ActiveDocument
fieldName = "BookmarkFieldName"
SET Field = Doc.Fields(fieldName).GetPossibleValues

FOR index = 0 to Field.Count-1
Doc.Fields(fieldName).Clear
Doc.Fields(fieldName).SELECT Field.Item(index).Text   
fieldName1 = "BookmarkFieldValue"
SET Field1 = Doc.Fields(fieldName1 ).GetPossibleValues
  Doc.Fields(Field.Item(index).Text).SelectValues Field1
Doc.Fields(fieldName).Clear
NEXT
END SUB

13 Replies
petter
Partner - Champion III
Partner - Champion III

If you ask it as a new question I would be able to give you a response....

dmohanty
Partner - Specialist
Partner - Specialist
Author

Thanks petter.skjolden‌,

I have created it.

petter
Partner - Champion III
Partner - Champion III

I can't find any new question ...

dmohanty
Partner - Specialist
Partner - Specialist
Author

Hi petter.skjolden,

The moderator is yet to approve the new post. By the way, here is the thread below -

VBScript to JScript - Help in converting!