Problem
How do I automatically copy or move a PDM Data Card variable value from one variable to another?
Solution
There are a number of ways to accomplish this:
- The API can certainly be used to extract a value and copy it to another. However, unless there is a complex set of conditions under which this needs to happen, and setting up rules to watch for those conditions is the best method for triggering the move/copy, then this approach may be a bit heavy-handed. If a custom application is being leveraged to pull data from another source (ERP part numbers, for example), then it might make sense to include this in the code if it needs to update other variables anyway.
- Dispatch can also be leveraged to capture a document's existing variable values and copy or concatenate them into another variable. We commonly do this to update the document version number in a card variable on check-in. This ensures that the file was checked out to begin with, and doesn't require Dispatch to perform the check-out. This also prevents error-handling loops and messages from being coded into Dispatch in case the document cannot be checked out, for various reasons. If all I need to do is copy one variable value to another variable on the same file's card, this may be overkill.
- Workflow transition actions provide the simplest method. The "Update variable" action can pull any variable's value and write it to another. It can even concatenate a number of values together. This action type is very commonly used to write approval dates or update the revision value. This is what an "Update variable" action might look like if we are copying the values of the "MATERIAL" and "DESCRIPTION" variables into another variable called "Keywords." Note the syntax. This can be typed if your list of variables is long and you have a large number to set up.
If you leverage this method and need to set up multiple transitions with the same or similar actions, you can copy & paste transitions and save yourself a great deal of time.
For additional support, existing customers can submit a ticket or new customers can contact Hawk Ridge Systems.
Comments
Article is closed for comments.