sean.stevens - Tuesday, June 16, 2015 10:11 AM:
I have a request from our master data team to view change logs at the field level. So whenever a field has been changed, they want to know:
- what field was changed
- what the prior value was
- what the new value is
- when was the field changed
Where can I find that within Innovator 9.3? Thanks in advance!
Harsha - Saturday, June 27, 2015 3:34 AM:
Hi,
History can be tracked only for the items which are versionable. For each property in an ItemType you could see a 'Track History' Boolean, enable 'Track History' on the property for which you want to track its history.
After enabling 'Track History' on a property then we could see all its history on 'Item History' of Item.
Harsha
sean.stevens - Monday, June 29, 2015 9:05 AM:
Hi,
History can be tracked only for the items which are versionable. For each property in an ItemType you could see a 'Track History' Boolean, enable 'Track History' on the property for which you want to track its history.
After enabling 'Track History' on a property then we could see all its history on 'Item History' of Item.
Harsha
Thanks Harsha. Is there a way to enable that Track History globally rather than having to go into every property individually? That seems like a pretty time-intensive process to touch every property.
Thanks!
-Sean
Harsha - Monday, June 29, 2015 10:53 PM:
Hi Sean,
I don't think that there is an option to do so. Do you need to enable Track History for system properties also? If so, we can do that using a method. Create a Server method and use the below sample code.
If you don't want to enable 'Track History' for system properties then create a List<string> with the names of the properties and use a linq query to exclude the listed properties from modifying.
//Below code enables 'Track History' of all the properties of 'Part' ItemType.
Innovator inn= this.getInnovator();
Item itemType = inn.newItem("ItemType","get");
itemType.setAttribute("where","[ITEMTYPE].name='Part'");
itemType = itemType.apply();
if(itemType.getItemCount()==1)
{
Item property = inn.newItem("Property","get");
property.setAttribute("where","[PROPERTY].source_id = '"+itemType.getID()+"'");
property=property.apply();
if(property.getItemCount()>0)
{
for(int p=0;p<property.getItemCount();p++)
{
Item res = property.getItemByIndex(p);
if(res.getProperty("track_history")=="0")
{
res.setAction("edit");
res.setProperty("track_history","1");
res = res.apply();
}
}
}
}
return this;
Just run this method on your own by selecting 'Run Server Method' from method 'Actions'. This will set true to 'Track History' of all properties.
Thank you, Harsha