Calling VBScript functions in a workflow
I have implemented a variant of the extract workflow that comes with Essentials. The workflow runs fine, but because of some aspects of our ArcGIS Server/system setup, I get a wrong download url from the workflow, e.g. http://myserver.com:<port_number>/rest_of_the_path. To be able to download the result from server, I have to add an "s" to make https, and remove the port number from the url.
To solve this, I have tried to alter the resulting download url by adding a VB Script to the workflow. The VBScript acticity should take the result.Url from the geoprocessing activity, do the necessary string formatting and pass this corrected string on to the DisplayHyperlink activity. The script itself is very simple:
outUrl=Replace(inUrl,"http://myserver.com:<port_number>","https://myserver.com")
Running this, I get the error message:
Exception has been thrown by the target of an invocation.
Workflow 'Extract data' failed
Aborted exception: ''Replace' is not declared. It may be inaccessible dye to its protection level.'
'Replace' is not declared. It may be inaccessible due to its protection level.
Am I missing some import statements somewhere, or what could be the reason for this?
Regards,
Jostein
-
Thanks, Ryan, that did it. Much simpler and more elegant than the solution I tried.
Still, I would like to know why my little script refused to run the Replace-function. Any thoughts?
Jostein
0
Please sign in to leave a comment.
Comments
1 comment