02-08-2016 03:12 PM
For any given [Organizational Process] is there a way of displaying the "Delivery Date>" for the most receint "Action" performed lisited in the [Organizational Process] history and then display this date on a generated website.
The midified date only covers the process not links this this date that im after coveres for all changes including links.
03-08-2016 11:28 AM - edited 03-08-2016 11:29 AM
Hello,
if the only thing you're interested in is the last modification date (including links), you should consider creating a calculated MetaAttribute ("Virtual") : in the macro linked to the metaAttribute, search for the last created "ChangeItemDataPublic" linked to your Organizational Process.
Example of macro :
Sub GetAttributeValue(Object, AttributeID, Value) Dim myDate, oCIDP myDate = "" For each oCIDP in Object.getCollection("~Z1000000CS50[ChangeItemDataPublic Log]") If myDate = "" Then myDate = oCIDP.getProp("~610000000P00[Date de modification]") Else If oCIDP.getProp("~610000000P00[Date de modification]") > myDate Then myDate = oCIDP.getProp("~610000000P00[Date de modification]") End If End If Next If myDate = "" Then myDate = Object.getProp("~610000000P00[Date de modification]") End If Value = myDate End Sub
Be aware that if you delete history when reorganizing your repository, your new metaAttribute will then have the same value as the standard "Modification date" metaAttribute.
You can use this new metaAttribute wherever you want, even in generated websites 🙂
Regards,
Lionel