I have found a solution using decision and pre condition
Can you please share the final design? Thanks
Why not change your "Incident Change Completed" precondition to be a calculation and then you could test on the status of the latest change in the collection using the "latest()" function.
Hey Jules - i don't think you can do latest on the Incident Changes collection as there are no datetime fields on it (which is what Latest() or Latest Value uses) and you cannot add them because it's a system object that can't be edited - i guess even if you could it wouln't be possible to back fill the values for existing incident changes.
Correct me if I'm wrong
1 of 1 people found this helpful
Lianne you're correct you can't use Latest() here as the linking objects don't have CreationDate attributes.
You can work past it though using a For loop. If you will only ever have one Change attached you can do:
LatestChange = null For Change in Incident.IncidentChanges: LatestChange = Change
This will give you a variable called LatestChange. Or if there are multiple changes and you need the latest:
LatestChange = null For Change in Incident.IncidentChanges: if LatestChange == null or LatestChange.CreationDate < Change.CreationDate: LatestChange = Change
Hope that helps.
Thanks Stu - not live with this one yet so can change the calculation as per your suggestion