AnsweredAssumed Answered

Scripted Finds

Question asked by hopkins on Oct 29, 2008
Latest reply on Oct 30, 2008 by hopkins

Title

Scripted Finds

Post

I wanted to set a single line in a sub-script to do a specific find dependant on the original calling script, but found that "Perform Find" with a function in the find specification does not work.  I cannot see why it should not.  Any suggestions?

 

The actual line of the script I wanted to use read (the SciptParameter is the match ID that links the item of current concern with its classification in a classifications table and the search is for a "file" of the same classification):

Perform Find [ Specified Find Requests: Criteria: Files::Classification Match: "=GetAsNumber ( Get ( ScriptParameter ) )" AND File::File Status: "="Open""].

 

The only error message I got when setting up this was a reminder that the first part of the find request needed a number; but the function does return a number so that did not make sense. 

In its place, to make this search work, I had to use four lines of script:

Enter Find Mode []

Set Field [Files::Classification Match; GetAsNumber ( Get ( ScriptParameter ) )]

Set Field [Files::File Status; "Open"]

Perform Find [] 

 

Thank you. 

Outcomes