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: 

Getting the Author of Item

4 REPLIES 4
Reply
Message 1 of 5
rcoffey2
589 Views, 4 Replies

Getting the Author of Item

Is it possible to return the creater (owner) of an item to use in that items fileds. For example if you wanted each item created in a workspace to contain the Auhor of that item. Seems like I should be able to do that as a computed field, but have failed to figure it out. Also looked at a script and did not get anywhere. Your guidance is appreciated, seems like there has to be a way to do this. 

Tags (1)
4 REPLIES 4
Message 2 of 5
jpiggee
in reply to: rcoffey2

Rodney,

 

Finding the creator of an item within the workspace can be obtained one of two ways. The first way being the usage of the Change log, which is a built in tab, that anyone with the right permissions could see.

 

However, if I understand your question correctly you will want to use a behavior script that will use the argument of “ownerID” that will pull the information that you are looking for and place it with in a designated field within the item.

-----

 

Reference: http://wikihelp.autodesk.com/PLM_360/enu/Help/Help/0032-Administ32/0064-Scriptin64/0071-Scriptin71

Look under Objects on item Properties -> Descriptor (read- only)

Joseph Piggee
Fusion 360 Administrator
TPI Composites
jpiggee@tpicomposites.com
Message 3 of 5
rcoffey2
in reply to: rcoffey2

These were the options I was looking at. The change log is great, but like to have it as a filed in the details. I was looking at it as an action scipt on item creation, but am having a little trouble generating the script from whats in that wiki. Is there any change you could provide a sample. Seems like this would be an awefully usefull library script. One that just fills in data based on values in the system. I know there is the one to pass properties with item creation sciprt, but all I am looking to do is fill this out, not create a new item.

 

So

 

If Author is null then populate Author with Created by or Onwer, I think either of these will wotk. If you could provide a sample for the code it would be greatly appreciated, I will add it to my library and use it for some other things I have been looking at.

 

Thanks,

Message 4 of 5
broepke
in reply to: rcoffey2

I've done this in the past really only for one reason that makes sense - when you want to add the "owner" into a field that can be used in the descriptor.  I used this on the "tasks" workspace in the past when I had a ton of tasks on Projects - makes the Gantt easier to read on an overview level.

 

Here is the code I used. (action script)

 

var usrName = "";


//Get the user's full name - "First Last"

var usr = Security.loadUser(userID);
usrName = usr.lastName + ", " + usr.firstName;


//check to see if the user names match, otherwise update it.

//Note - the "RESPONSIBLE" field in this script is a pick list to the

//"user, all" pick list.  This will ensure no typo's

if (usrName !== item.RESPONSIBLE){
//the conditional checks to make sure that it only write if the value

//has changed, otherwise skip it - good practices to avoid a messy

//change log.

item.OWNER = usrName;
}

 

Normall I'm not a fan of this type of workflow because you're essentially duplicating data.  However, it does the job and I have used it.

 

Keep in mind that to get this to work you have to fire the script.  I do it on the behavior for "modify".



Brian Roepke
Director, Analytics & Insights
Message 5 of 5
broepke
in reply to: broepke

Small error above - Change in the last line

 

item.OWNER = usrName;

 

to 

 

item.RESPONSIBLE= usrName;



Brian Roepke
Director, Analytics & Insights

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

Post to forums  

Autodesk Design & Make Report