cancel
Showing results for 
Search instead for 
Did you mean: 

Script in Application plan

Nathalie_Maille
Champ on-the-rise
Champ on-the-rise

In a manual application plan in Perceptive, one of my field is assigned to a predefined list.  I would like to know if it is possible to read what value was chosen in the list from a script when indexing the document?

When defining the indexes in the manual application plan designer, I added a simple vb script to display the content of the field

 

msgbox(Field1)

 

But it is always empty even when I pick an item from the list.

 

It works if the field is literal but not with a list.

 

Any suggestions?

 

Nathalie

7 REPLIES 7

Hi @Nathalie Maillet  - Are you running this as a vbs file separately from the scripting interface within the client? If so, you need to make sure that the desktop client is running. The COM object will not be available if the client is not running.

That was the problem, my client was not opened.

 

I tried with the client opened and I didn't get the error.  But it always return 0.

 

When testing with the code you gave me, I noticed the vb script is called before I get to the Index window, when adding a document with the ImageNow printer. 

 

I expected the script to be called after exiting the index window and before the document opens so it would be able to check the values in the indexes.

 

Instead I will probably use an iScript on my workflow queue to check the values in the index afterwards.

 

Thanks for your help!

 

Nathalie

Hi @Nathalie Maillet - That is all correct. The script will be triggered when the Application Plan is run. If you are running with just the client logged in there will be no viewer context for the script so the response will be 0 because are calling the method to get the keys from the viewer.