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 I get the 'Last Modified Date' through scripting?

11 REPLIES 11
SOLVED
Reply
Message 1 of 12
wendy.salas
522 Views, 11 Replies

How can I get the 'Last Modified Date' through scripting?

Hello,

 

We are looking to create a script to send an email when no changes have occurred in a CAPA record within the last week.

 

We were thinking of using the Change Log, but then realized that the 'Last Modified Date' that appears in the 'owner and change summary section' is actually what we need.

 

How can we get, through scripting, to the 'Last Modified Date' in a record?

 

 

11 REPLIES 11
Message 2 of 12
leungjcp
in reply to: wendy.salas

Do you mean no changes in the workflow state or no changes to the item record?  I was thinking....

 

item.workflowActions[i].timeStamp

where i=0 is the last state of the record?

 

When you click edit to a record and save without making any changes, it may or may not change the "last modified" date.  It would depend if you have any on -edit scripts.

Message 3 of 12
tony.mandatori
in reply to: leungjcp

I only see a createdDate on the descriptor.  If the items are revision controlled, then the createdDate might help.  

 

DescriptorAttributes.png

 

Otherwise, you might be able to use the workflow history:

 

println(item.workflowActions[0].timeStamp);

 

 

 

Message 4 of 12

Hello!

 

Thanks both for the input!

 

I our business case, the change may or may not be related to a WF action. This workspace is basically an online form, and users can remain in the same stage making updates for several days, so the only change logged would be an Edit action.

 

Thus we want to send reminders in case not even an Edit has happened in the past 9 days, however, we are struggling to get to the Change Log or Last Modified Date to see this.

 

Please let me know if this is possible or helps clarify.

 

Thanks!

Message 5 of 12
leungjcp
in reply to: wendy.salas

Oh, so there is no workflow associated with this online form? When would the form be considered "completed"?
[http://www.nucap.com/images/image001.jpg]<> Jason Leung - Design Engineer
NUCAP Industries Inc.
3370 Pharmacy Avenue, Toronto ON
Ph.416 494 1444 FAX.416 494 2505
Jason.Leung@nucap.com

Please visit us at www.nucap.com<> www.gripmetal.com<>



[http://www.nucap.com/images/banner-pistoncushion.png] <>
Message 6 of 12
wendy.salas
in reply to: leungjcp

Good question! 

 

There is a workflow, however, the form is basically living and breathing, since this it is an online form where the team is making updates as they do investigation to solve problems. Thus, they may not submit for review or approval, until done with their research, but multiple team members are contributing to this form.

 

Thus, any changes are not necessarily committed to the WF Actions, we want to make sure that the teams doing research are being active and updating their findings, even if they are not ready to submit yet. Does that help clarify?

Message 7 of 12
leungjcp
in reply to: wendy.salas

Yes, I get the picture now. You want to make sure the contributors to this form are filling out their portion of the work.

I assume there are specific fields which cannot be blank and you want to monitor this every nth day. I'm thinking you can utilize an escalation script, either in the current workspace or in a separate "hidden workspace" which will check the condition of these fields. When escalated, you can run a script. If fields are blank, you can send emails to the required teams.

If you create a transition back to the current state, you can trigger the escalation script again, every nth day, until it moves out of the current state. Not sure if that will help you. I've used this method to send reports and charts by email every nth day to my teams.

[cid:image001.png@01D2C59A.2471D100]
[http://www.nucap.com/images/image001.jpg]<> Jason Leung - Design Engineer
NUCAP Industries Inc.
3370 Pharmacy Avenue, Toronto ON
Ph.416 494 1444 FAX.416 494 2505
Jason.Leung@nucap.com

Please visit us at www.nucap.com<> www.gripmetal.com<>



[http://www.nucap.com/images/banner-pistoncushion.png] <>
Message 8 of 12
leungjcp
in reply to: leungjcp

image1.JPG

Message 9 of 12
dvirh
in reply to: wendy.salas

Sorry for the late response Wendy.

 

You can easily get this value by using item.descriptor.lastModifiedOn

As Tony noted our help file doesn't seem to reflect this option. I will make sure to update the help file to include this option.

Hagay Dvir
Engineering Manager
Fusion Manage
Autodesk, Inc.
Message 10 of 12
leungjcp
in reply to: dvirh

Ah...Thanks Hagay.
[http://www.nucap.com/images/image001.jpg]<> Jason Leung - Design Engineer
NUCAP Industries Inc.
3370 Pharmacy Avenue, Toronto ON
Ph.416 494 1444 FAX.416 494 2505
Jason.Leung@nucap.com

Please visit us at www.nucap.com<> www.gripmetal.com<>



[http://www.nucap.com/images/banner-nrx.png] <>
Message 11 of 12
wendy.salas
in reply to: dvirh

Thanks Hagay! It would be great if it gets added to the documentation.

Message 12 of 12
wendy.salas
in reply to: leungjcp

Thanks Jason! Since we are considering fields that can be updated at any point (not necessarily in a pre-defined sequence) we need to look at the whole workspace changes. However, will keep an eye on this solution as it is definitely applicable to other business processes.

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

Post to forums  

Autodesk Design & Make Report