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: 

multi select pick lists and spawning

2 REPLIES 2
Reply
Message 1 of 3
ihadden
294 Views, 2 Replies

multi select pick lists and spawning

I am having some trouble with a spawn script. I am spawning an item but the Multi select pick list content in not coming over. 

The Item that I am spawning from has a multi select pick list on it and a matching multi select pick list exists on the item to be spawned. I would like the selections from the spawniung item to populate the list on the spawned item. 

 

Does anyone have any pointer on how i can do this?

 

Thanks

2 REPLIES 2
Message 2 of 3
BiggePLM
in reply to: ihadden

I ran into this early on and have used it ever since, don't know if there is a better way or not.

 

The multi select field is an array and as far as I know you can't make an array equal another array. You must step through the source array (multi select field) and build the target array (multi select field) using the new properties field

 

I.E.

 

for ( i in source.field)

     {

          newProperties.targetfield(i) = sourcefield(i)

     }

 

Not sure if the syntax is correct but this has worked for me

 

BD

 

Message 3 of 3
nguyentru
in reply to: ihadden

Hi ihadden,

 

Based on your post, it seems that you might have forgotten to create a link back from workspace B to workspace A.

 

Here is a simple script that I wrote that will spawn a Task record from Project Record.  As you can from the script, I have Bold and underline the 2 lines of script that will create a link back to Project Record

 

I hope this helps...

 

thank you,

 

Trung

 

if(item.SPAWN_TASK_WS !== null){

var newProperties = [];

newProperties.PROJECT_LINK = item.descriptor.descriptor;

createNewItem('WS_PM1_TASK_MANAGEMENT', newProperties);

if(newItem !== null){
item.SPAWNED_TASK_LINK = newItem;
}
}

Trung Nguyen | PLM Product Management | Autodesk, Inc.

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

Post to forums  

Autodesk Design & Make Report