I'm writing a script that will look at a item field for a code that was enetered at the item creation. Based upon that code the script will "look up" some data in a table or something and use that data in the scripted routine (in this case it will be populating milestine dates).
What's the best way to have a script "look up" data? Via another workspace, external file ect.?
FYI The idea is that we classify our tasks/workflows by a code. That code indicates a certain period allowed before enetering the various workstates. For example: code A means you have 1 week to enter state "1", 1 week to enter state "2" etc. Code B means you have 2 weeks for each state, Code C......3 weeks and so on. This way when the item is created we can just pick a code and not have to fill in every detail for the milestones.
Solved! Go to Solution.
I would think this could be solved using an “if.. or” statement, or depending on the number of options a “case” statment could work as well.
That would work too but would create some rather long code as I have dozens of cases to consider. Also, when I modify the data I don't want to have to scan through the script. I'd rather edit a table or something.
To be direct, how would I look up an item property in different workspace and pass that item/array to my current workspce via scripting?
You could have a separate Workspace that holds an index of sort, and based on the inputted information it could reference this workspace which in turn could direct the script to look for the proper information, be it a grid or another record. An example of this can be seen in the custom number gen with in the base tenant.
However in either case, I would look at reducing the automation as the time out possibility or fault locations on this could be quite painful for you in the long run.