Fusion Manage Forum
Welcome to Autodesk’s Fusion Manage (formerly Fusion 360 Manage) Forum. Share your knowledge, ask questions, and explore popular Fusion Manage topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can a new record created through the PM tab inherit values?

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
427 Views, 5 Replies

How can a new record created through the PM tab inherit values?

I have a single Tasks workspace with a fairly simple workflow that I am trying to use with several Revisioning Workspaces.  My process is to create tasks from the Project Management tabs of those workspaces.  This is easy enough to do but what I cannot figure out is how to automagically reference the originating record in the new task.  I have scoured the boards trying to find the answer and I thought I was onto something, but I am hitting a wall.  I've already been down the path of linking picklists but that still seems to require manual intervention and it doesn't work well with the multiple originating workspaces.

 

My latest thought was to use scripting to fill in a field on a task with a hyperlink pointing back to the originating record.  At this time I'm okay with creating a link to the originating record even if possibly the task is also assigned to another project as well.  So my questions revolve around capturing the dmsID and/or workspaceID of the originating record.

 

1. In general is there a way to automatically populate a field on the new item record to reflect a field from the originating record?  I've considered OnCreate but the new record doesn't seem to be able to see anything about the originating record.  I also considered OnEdit for the originating record, after the new item is created, but Project Management changes don't seem to set off that behavior.  Is there a way to default a value on the new item or call a script to do it?

 

2. If there is a way to do #1, can the workspaceID and/or dmsID of the originating record be one of the values copied to the new record?

 

3. If #2 isn't in the cards, then my next thought is to ask the creator to enter the dmsID in a field on the new record by looking at the URL on the screen.  If I do this, can I get the workspaceID if all I have is a dmsID?  I tried the loadItem() function and made up some properties for the Descriptor property of the Item object, but came up empty trying to get the WorkspaceID.

 

And that's where I'm stuck.  I could ask the creator to enter both the WorkspaceID and dmsID from the URL of the webpage but that's getting further and further away from automatic.

 

Has anyone found an "automatic" solution for creating this link back to the originating record?

 

Thanks for the help!

5 REPLIES 5
Message 2 of 6
BiggePLM
in reply to: Anonymous

j.Hendrickson,

 

I have also had this issue.

 

The best option you would think would be to use scripting. But the only triggers are. Create, edit Item Details or Workflow Transitions.

 

For most task linking activities I have been lucky in that the normal workflow is to always create a new task in the Project, I generally create a required Linking Picklist field on the Task that the user has to select the project they are making the link to during the Add Linked Task function. This limits you to only one project per task. It would be nice to have some way to push or default the project record you are creating the task from to this field instead of having to ask the user but I have not found a way to do this.

 

The second method which I use more often is instead of using the manual add task I use a workflow transition in the project to utilize the Create Item Script function. This allows both feeding the task linked picklist field with the project dmsID and adding the Task record to the PM tab of the project.

 

This would also work using the On Create Behavior in the Task as long as you make the user select the project to assign a required field in the task record.

 

I have been trying different methods to Automate this linking and haven't had a good single solution and is usually on of the more difficult Admin configuration activities when I am setting up workspaces for a new workflow or process to manage using PLM360 for my company. I feel like you that we should be able to more easily accomplish this automation, but haven't found a solution worthy of submitting to the Ideastation for consideration. Maybe if others on this forum can chime in we can collectively get to a solution.

 

Fellow frustrated Admin.

 

Bob Donovan

Message 3 of 6
Anonymous
in reply to: BiggePLM

Bob, it's been a while but as you know these problems don't just go away on their own. I've found a pretty good solution for creating new tasks from the Linked Items tab of a workspace. Since I use a single task workspace with multiple originating workspaces I can't use a single workspace picklist in the task to choose which record it is associated with. Instead I have two fields in the task that are manually filled in with the Workspace ID and DMS ID of the originating record, always found in the browser address box at the top of the page when creating a new task from a linked items tab. Then there's an item creation script that runs in the task to use those values to create a hyperlink in the task's item details. Not perfect, but it works.

So I have a question for you about the second method you mentioned. I assume you are using a transition action script to create the task which is able to fill in the linked picklist field with the project info. Then where is the script that adds the task to the PM tab of the project? Same script or an item creation script?

Thanks,
Joe Hendrickson

Message 4 of 6
BiggePLM
in reply to: Anonymous

Joe,

 

Quick answer is I use the initial WF transition script of the spawned record to add the newly spawned record Link to the PM (or Linked Items) tab of the originating project record. You have to do it this way because the dmsID of new record is not available to either the WF Transition script that spawned the new record, nor the Create Behavior script of the New record to use in a item.project.AddTask function.

 

Not sure why as when you use the createItem function you can store the new dmsID to then put it in a field in the item details, it has something to do with the nesting of the scripts for spawning.

 

So in short what I do for spawing records from a project worflow transition is as follows:

 

1. Project WF Transition Script - Uses CreateItem Function - Pass Project dmsID through newProperties to item details of source record (for multiple workspaces must have field for each if using picklists) Or could use text fields.

Spawned Record Item Details.JPG

 

2. Initial WF trasition action script then uses the field to Add to the PM tab of the original record. Load Item -> itemref.projects.AddTask, Note if your task WS does not use milestones you must pass the start & end dates or the add will not update correctly.

 

Initial WF Transition Script.JPG

 

Hope that helps.

 

While we are on the subject, if I understand you correctly you are somehow passing the dmsID of the originating record to the new task records item details through the On create script of the newly created tast record. How are you passing that if you use the Add Linked Item function in the orginal record you have no originating script to pass that info? Or am I mis-understanding your sequence of events or are you making the user enter those values into required string fields during the create dialog box?

 

All of this is geared towards making adding and tracking tasks from a central project view and not make the project managers have to do alot of steps to add all the records to their project for managment of the tasks. The original Project WS / Task WS is fine in terms of just establishing a project task list. But as a project grows it would be nice to start feeding back information from those tasks directly in the PM tab (custom or linked fields) so the PM can see more detail, that is why I started using the Linked Items tab which leads to all these scripts etc to minimize the additional steps required. 

 

Appreciate the update and we need to utilize this formum (one of the best tools for PLM Admins) to continue to share and help each other.

 

Thanks,

 

Bob Donovan

Message 5 of 6
Anonymous
in reply to: BiggePLM

Bob, I've never used a script in the initial workflow transition so that was the piece I was looking for. I have heard chatter on this board that that is not recommended but it sounds like it's been available for years so I may just have to start using it.

In regards to how I've been creating tasks I have been having the user (me) enter the dmsid and workspaceid values into required fields during the create dialog box. It's not a pretty solution but it works.

Have you used the on demand scripting feature yet? Seems like they might be applicable somehow too.

Thanks for the info! Keep on posting...

Joe Hendrickson
Message 6 of 6
BiggePLM
in reply to: Anonymous

Yeah, they keep talking about Deprecating the Initial Workflow Action Trigger but so far has not happened.

 

With both the Item Create and the Initial WF Action there is potential for someone to generate a run-away script that never ends, so they put restrictions on them like prevetion of certain events occuring in nested or a single script chain. I have had extensive discussions with the Autodesk Support group about this and I believe that they will find a way to keep the initial wf trigger active. This is evidenced by in one of the releases in the past 6 months they updated the scripting engine to allow multiple spawing of workspace records from a single action script. This was previously restricted to single spawning because of the issues above.

 

Again thanks for your input and hope this all helps, if you come up with any good ways for adding items to multiple tabs to simplfy the user data entry time let the forum know.

 

BD 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report