Setting a variable in PDM workflow transition to track user

Discuss SolidWorks PDM
UnusedUsername
Posts: 3
Joined: Tue Apr 13, 2021 11:34 am
Answers: 0
x 1
x 2

Setting a variable in PDM workflow transition to track user

Unread post by UnusedUsername »

I have a workflow set up for drawing files and in it there's a transition from the "Detailing" state to the "Drawing To Be Checked" state through a transition called "Submit for Check/Approve".

In the transition, I currently have a 'Set Variable' Action, set to 'Run for files' which is supposed to set the text variable 'CheckRequestor' that I just made to %user% (ie., the user id of the person who triggered the transition).

However, whenever I trigger the transition it seems that the variable does not get set for the file. I have a column view that shows the variable remains blank. The objective for this is to be able to notify the requestor if the check is rejected and sent back and/or if the file gets approved, which I'm using a conditional notification for in a later transition. But it seems that since no value is being applied to the variable, no notification is being sent (I'm actually not 100% sure it would work if the variable was set, but the current issue seems to be just getting the variable set).

Any ideas as to why I can't seem to get the variable set to the user id?

Thanks
User avatar
Diaval
Posts: 87
Joined: Wed Mar 17, 2021 12:01 pm
Answers: 7
Location: Stockholm
x 50
x 110

Re: Setting a variable in PDM workflow transition to track user

Unread post by Diaval »

in order for PDM to be able to set a variable for a file through a Set Variable action on a workflow transition, the variable needs to exist on the file data card for that file type. Check the data card you are using for slddrw file types and make sure your variable is somewhere on the data card. Once the variable is on the data card, it should get the correct value on the Set Variable action on the transition.

For the conditional notification for drawing files, the notification should be setup to use the variable as the recipient and the condition should be setup as a Filepath condition with text contains %.slddrw. This would apply to all drawing files in the vault. If you need to limit it to a specific folder path, you can add the path to your folder from the root of the vault as \RootLevelFolder\Subfolder\...\%.slddrw. Add as many levels as you need and add the filetype as %.slddrw at the last level. If you need to add multiple folders, setup each folder as a separate condition contained in an OR condition.
-- To espouse elucidation we must eschew obfuscation
Post Reply