Our Environment: Ivanti ITSM 2016.2.1. I read that it is possible in this version to use filtered link field, but i cannot find it.
OK, so this only works in 2017.1+ as far as I can see.
To do it in HEAT 2016:
- add a status field to frs_compositecontract_contact (see A method to hide Employees with the Status 'Terminated' so they do not show up in the available drop-down fields. )
Please only do the steps until "2c", e.g.:
-> add the field "Status_" (Unicode Text 40 - Image 1) to frs_compositecontract_contact#
-> create an initialization rule (Image 2) in the Employee# object
-> create an editing rule "on update of Status" in the Employee# object
-> Update existing employees via SQL once:
UPDATE Frs_CompositeContract_Contact SET Status_ = e.Status FROM Frs_CompositeContract_Contact c JOIN Frs_CompositeBase_Employee e ON c.RecId = e.RecId WHERE c.Status_ IS NULL
Set your Link Field2 expression in the Incident ownership form:
$([Frs_CompositeContract_Contact#.IncidentAssociatedCustomer]Status_ != "Terminated")
Nice tip. The only thing i had to do was:
Open the Incident Business
5. Click the Relationships tab
6. Find and click on 'IncidentAssociatedCustomer'
7. Click on the 'none' field next to the Condition: tag towards the bottom
8. Enter the following (4th image):
$([Frs_CompositeContract_Contact#.IncidentAssociatedCustomer]Status_ != "Terminated" ||
[Frs_CompositeContract_Contact#.IncidentAssociatedCustomer]Status_ == null)
9. Save your work.
Big thanks to your effords and help!
there is a big disadvantage if you directly filter in your relationship: Once you open up an Incidents wit an inactive customer, the ProfileLink field will be shown as empty.
That's why they introduced the advanced item selector (Link Field2 expression) in 2016.
As long as you follow the steps I mentioned and modify your advanced item selector (=ProfileLink) with the newly added condition in your form, this should work just fine.
If you want to (or need to) directly filter in relationships, you should at least add a conditional status:
$(if Status == "Closed" || Status == "Resolved" then [OtherObject]Status_ == "Active" || [OtherObject]Status_ == "Terminated" else [OtherObject]Status_ == "Active")
Otherwise you won't be able to view closed Incidents where the customer doesn't have an active account.
You still won't be able to view active Incidents with inactive customers (which will happen at some point) though.