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: 

Script: Update values in a mutiselect picklist when a new revision is released?

10 REPLIES 10
Reply
Message 1 of 11
wendy.salas
543 Views, 10 Replies

Script: Update values in a mutiselect picklist when a new revision is released?

Hello,

 

We are looking to create a WS that holds the curricula for when new employees join. The goal is that each manager can define which documents they need to review and then, when they join we can track their completion (i.e. sign off on it).

 

However, I want to reduce the manager's manual work, and see if there is a way in which the curricula Item which contains a multi-select picklist of Document Items can be updated with a script such that if a document (e.g. HR Manual Rev;1) moves version (e.g. HR Manual Rev 2), the Curricula item updates automatically.

 

Is that possible?

10 REPLIES 10
Message 2 of 11

This topic is touching on two different types of picklist:

  • Multiple Selection 
  • Latest Version

 

The picklist can be one or the other, but not both.

 

So you could use the Grid tab to list all courses in the curriculum for new hires. And those courses can point to a latest version.

 

If you're setting this with script, be sure to use the DMSID of the FIRST version in the lineage - not the latest.  This is something that we debug a lot.  Although the latest is displayed, the first is used under the covers.

 

Multiple Selection pick list type does not support floating to the latest version automatically.

 

Does this help?

Message 3 of 11

Hi Tony,

 

Thanks for the clarification. Since we are using the Modern UI, we don't have access to write to the Grid tab yet. Thus, this approach would not be feasible.

 

Would having a script that 'updates' the multiple picklist searching for the latest versions not be possible? This script could run daily.

 

Do you see this as a feasible option or any other ideas given that we are in Modern UI?

 

Thanks!

 

 

Message 4 of 11

You do have scripted access to the grid tab ... you just need to request to have it revealed in the UI as View only.  Full access is expected in June.

 

Via scripting, you can control the records on it based on other attributes (like your multiselect picklist).

 

The idea of having to touch all the records daily feels a little intensive.  So I would prefer to keep track of initial selections on the multiselect and then creating the latest link on the grid tab via script (on-edit).  

 

After June you can rely on the Grid exclusively.

Message 5 of 11
dvirh
in reply to: wendy.salas

Wendy,

 

I have a question related to your question. When a new hire reviews a document, how is he expected to log the fact that he reviewed it? And if the document updated after the new hire reviewed that particular document, should the curricula still update to show the newer version?

Hagay Dvir
Engineering Manager
Fusion Manage
Autodesk, Inc.
Message 6 of 11
wendy.salas
in reply to: dvirh

Hi Hagay,

 

For each staff member, and document (and its corresponding Revision), there is a 'Training Tracker' item created that is set to 'Pending Completion'. Once the employee finishes reviewing the document, they have to execute a 'Sign-Off' transition. This marks the Training Tracker record as completed, and time stamps it.

 

The idea is that each Curricula associated to an employee is also linked to its related Training Tracker records. Thus, the Curriculum definitions are living and breathing records that we can use over and over, but the Sign-off execution of each training activity is linked to the specific version of the document that they reviewed.

 

Please let us know if you have any suggestions on this. Thanks!

Message 7 of 11
dvirh
in reply to: wendy.salas

Hi Wendy,

 

Thanks for the explanation. So if that is the case, then the document itself would be attached to the 'Training Tracker' object, right? If the document is attached to the Training Tracker object with the rule of 'pinning on lock', and if the user transitioned the Training Tracker item to a locking workflow state when he started to view the document, then you wouldn't need to change the revision of the items in the original item but rather only in the Training Tracker object for that document. Wouldn't that solve the problem?

Hagay Dvir
Engineering Manager
Fusion Manage
Autodesk, Inc.
Message 8 of 11
wendy.salas
in reply to: dvirh

Hi Hagay,

 

I am a little lost on the explanation below. To clarify, the 'Attachment' (which is where the file pining policies are defined) is linked to the Document Item (which is another Workspace). The Training Tracker Record will be linked to the Document Item only through relationships.

 

Thus, when we define the 'Document Items' someone who is onboarding needs to review, we need to assign them the highest available revisions of each Document Item, which needs to flow down from the Curriculum. 

 

Does that make sense?

 

Thanks!

Message 9 of 11

Hi Tony,

 

Do you have any examples of how to use the 'first version in the lineage' using the DMSID dynamically? Now that we are working on this development we are a bit confused on how to actually get this to work.

 

Use case:

1. User will enter in an Multiselect Picklist field  HR Document Rev:3; Tech Document Rev 2

2. In the Grid tab, we want to make sure that the we continuously push the latest versions so that when Rev 3 becomes Rev 4, or Rev 2 becomes Rev 3 we don't have to go and manually change every record.

 

Do you mean we should be picking always the Rev 1?

 

Thanks!

Message 10 of 11
gasevsm
in reply to: wendy.salas

Hi Wendy, Please use:

~ latest version picklist definition option (in picklist Manager; you may need to create another PL Definition against the same rev controlled workspace )
AND
~ select the latest version picklist field type (in workspace manager).

This will give you what you're looking for: user will only choose latest item rev from the pl dropdown when host item is in edit mode AND selected pl item will auto-float to latest rev when its revised.

HTH

Martin Gasevski | Fusion 360 Team Product Manager
Message 11 of 11

Wendy,

 

Try something like this:

 

item.LATEST = item.descriptor.revisionList[item.descriptor.revisionList.length-1];

 

The revisionList is sort in reverse order, so the last entry is the very first released version.

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

Post to forums  

Autodesk Design & Make Report