Community Tip - You can change your system assigned username to something more personal in your community settings. X
I understand that we can use the existing "History Computation Fields - Daily or Weekly or Monthly" triggers to store the field values to history.
But is there a way to store the values which we compute using custom trigger to the field history ?
Example : "Requirements Count" - I can compute this metric using a trigger but is there a way to store this value to history. The use case is to create a trend chart based on the history values.
I know a static computation field with aggregate function can be created and stored to history but I see from below article that PTC recommends not to use complex functions in static computation which will hit the performance of daily metrics trigger.
Any suggestions on this topic would be helpful.
Solved! Go to Solution.
"Requirements Count" (as defined by the ALM Solution that is a common package installed) is a regular field with the following key attributes: 1.) Never Editable (by users) 2.) Populated only by trigger.
In this case, the history is saved automatically, the same way when a user edits a (user editable) field the changes are stored.
Yours truly,
-Andrew
The function you want is shown below.
If you are already using that function and don't see entries saved to history - make sure you have the "Show Computed Fields in History" enabled.
View menu > Show Computed Field in History
public void computeHistoryNow(java.lang.String fieldname) throws mks.frame.triggers.TriggerException
fieldname
- The string name of the field to compute.mks.frame.triggers.TriggerException
- If the field is not a computed field or on error computing the history for the field.Hi @ascott
Thank you so much for your response.
I assume "ComputeHistoryNow" function can be used on fields for which the computation is defined at the field level in admin UI of PTC ILM. Correct me if I am wrong ?
I meant the fields like "Requirements Count" which don't have any computation defined at the field level and are calculated using DailyMetrics.js script. I don't see "ComputeHistoryNow" function used anywhere in this trigger script. But I am able to use this field in trend charts. So this means the values are getting stored in history but I am not sure how. Do you have any thoughts or inputs on this feature?
Thanks,
Vikram M
"Requirements Count" (as defined by the ALM Solution that is a common package installed) is a regular field with the following key attributes: 1.) Never Editable (by users) 2.) Populated only by trigger.
In this case, the history is saved automatically, the same way when a user edits a (user editable) field the changes are stored.
Yours truly,
-Andrew