|
#1
|
|||
|
|||
|
Hello Mirth Community,
I am trying to specify a base path in the External Javascript path textbox and cannot seem to do it. Is there a way to hack one in? I was trying: $("MirthConnectInstallDir")\custom-script\mine.js $(MirthConnectInstallDir)\custom-script\mine.js where MirthConnectInstallDir is defined in my global and channel Map. Thank you for your time. |
|
#2
|
|||
|
|||
|
OK so I suppose just having, "custom-script\mine.js" works fine.
However, I would still like to know if there is a way to make a base path work with this though. |
|
#3
|
|||
|
|||
|
In fact, you can use any path accessible on your network.
Like '//myfilserver/myshare$/myfolder/mysubflolder' or any other. This will be an absolute path, this is good if you need to access the same script from different servers. If you do not start your path with slashes, it will be relative to the installation directory. If you use backslashes, you eventually need to escape them by doubling them, so the above path would be '\\\\myfilserver\\myshare$\\myfolder\\mysubflolder '
__________________
JJ Mouris FFE Luxembourg IT-Department |
|
#4
|
|||
|
|||
|
As far as using a variable in that external script path, I don't think there's in "easy" way to do it, but you could have something in the deploy script that iterates through each step of every transformer, checks whether it's an External Script step, and if it is, runs a TemplateValueReplacer against the path property. Then the deploy script would need to save and redeploy the channel (an infinite loop would be avoided by only redeploying if any changes were made).
It's ugly, but it'd work. Of course, if the global variable you want to use is, for example, set earlier in the channel and then used in a later External Script transformer step, then that method wouldn't avail you. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|