How to Run A Script with an Action
Open the Action Library
1: Click Admin from the Menu.
2: Click Action Library from the drop down list - the Action Library will open.
Select the Action for Editing
1: Select the Action to be edited.
2: Click Edit from the Menu - the Edit Action window will open.
Open the Script window
NOTE: Scripts should only be written by people that are trained to write scripts as they can damage your database.
1: Select the Script tab - the Script window will open.
2: Activate the script to add a new script by clicking the Script Enabled check box - Leaving this unckecked will deactivate the script so that it will not run.
3: Type or Edit the script - This can only be done if the Script is Activated.
4: Click OK to SAVE changes and close the window.
For Advanced Users Only
FURTHER NOTES
The IronPython we're using is based on Python 2.6 - there's this reference which is a bit heavy, but quite complete: http://rgruet.free.fr/PQR26/PQR2.6.html
Also, "official docs" are: http://www.ironpython.net/documentation/
And.. a wiki from the IronPython in Action book..... http://www.ironpython.info/index.php/Main_Page
You can run scripts such as the following one – please be aware that the scripting module is very unforgiving of incorrect spacing (at the moment)
import clr
import sys
# Import the file
import ClaimsLibrary
class ClientScript:
def RunQuery(self, dataSet, connection, otherParam):
cycLib = ClaimsPythonLib(dataSet, connection)
queryResult1 = None
queryResult2 = None
retVal = None
#
# Add your code below ...
#
# For example..
queryResult1 = cycLib.isTrue("Claim","ClientContactFirstName = 'Jacob' And ClientContactLastName = 'Smith'" )
queryResult2 = cycLib.isTrue("Claim","ClientContactFirstName = 'Jacob' " )
if queryResult1 == True & queryResult2 == False:
retVal = 1091
else:
retVal = 1085
#
#
# Do not put anything else beyond here...
#
return retVal
0 Comments
Add your comment