I've been trying to create derived fields to pull a specific field based on an if statement. It seems to work but only if the field was the last "action", if it was further down, that field is not showing.
Example:
Employee is a BusinessClass
owned by hr
Derived Fields
TermReason is a DerivedField
type is Alpha size 50
for each EmployeeTransactionHistoryRel
if (each.EmployeeTransactionHistoryRel.InitiatingAction = "Terminate")
return each.EmployeeTransactionHistoryRel.ActionReason
else
return "N/A"
If the Last Transaction was Terminate, then the ActionReason pulls correctly, however if there had been different InitiatingActions since the field comes over blank.
Also tried the following with no luck:
Employee is a BusinessClass
owned by hr
Derived Fields
TermReason is a DerivedField
type is Alpha size 50
if (EmployeeTransactionHistoryRel.InitiatingAction = "Terminate")
return EmployeeTransactionHistoryRel.ActionReason
else
return "N/A"
Anyone else try to create a derived field from a one to many relation BC and have success?