Thanks for pointing me in the right direction. I ran into errors but presume that it is something I am updating incorrectly in my calculation as it is based on the Incident.change object. I tried a combination of updates to my calculation (which is actually this, since the customer uses the incident domain for their request process)
static def GetAttributeValue(Change):
Value = Change.IncidentChanges.Incident._TargetDate
I tried replacing "Parent" or "ParentLink" with Change.IncidentChanges but just ran into errors. Any suggestions greatly appreciated.
The important point of the other thread is that you can't just reference the collection, you need to use a For loop to get the attached Incident. In your case IncidentChanges is a collection that could have multiple Incidents attached. You need to decide which incident you want to get the Date from. If there will only every be one incident attached you can just do the same trick I suggested in the other thread of looping through and setting the incident to a variable.
I hope that helps.
I have had a play with the loop calculation but ran into some errors. Can you tell me what "ParentLink" relates to in your post. I am presuming "Parent" in my case would be "IncidentChanges" but just not sure what to substitue "ParentLink" for:
Example from previous post:
Parent = null
for ParentLink in Request.Parents:
Parent = ParentLink.Parent
if Parent == null: return null
else: return Parent._UserStartDate
I was planning on writing a full document explaining loop techniques but haven't had a chance yet. Your latest calculation looks like it should work so it depends what error you're getting as to what the problem is now.
Basically "ParentLink" is just a name you give for when you reference each item in the loop. You can call it whatever you want:
for Stu in Incident.Notes:
Value = Stu.Title
In my case I called it ParentLink because each item in the Parents collection is the linking object record so it seemed a sensible name.
Sorry I just realised the calculation you put into your last post wasn't what you're trying to use.
In your case you don't need to rename ParentLink but you could call it "ChangeLink" or something similar so it makes more sense, then within the loop where I reference "ParentLink.Parent" you'd change the ".Parent" to ".Change" or ".Incident" to get to the record on the other end of the link.