$EmpStatus is pulling the āemployementStatusā identity attribute which has a value of āLeave of absenceā in it. It then strips the spaces from it for the expression to compare.
Even if the identity attribute value were missing, the āNONEā value would be returned and the expression would result in āfalseā and not error.
Please pay attention to what I posted. I already said that the data and the code match from sandbox. It works there, but not in production. This is a bug in production in my opinion.
I believe there is an āorder of operationsā issue in production and itās not calculating the $EmpStatus value correctly.
I get the same message āError rendering template: $EmpStatus eq Leaveofabsenceā with your transform when the identityAttribute I use is not mapped.
For example, using the identityAttribute firstname would work but personalEmail would give the āError rendering templateā message.
Can you verify that employmentStatus is mapped correctly in production?
Also as a note, it is not recommended to use identityAttributes during the calculation of another identityAttribute. We recommend using the accountAttribute transform when calculating other identity profile attributes.
This excerpt is pulled from the identityAttribute docs on our site.
This transform is not intended for use within an another identity profile attributeās calculation. Identity attribute calculations are multi-threaded processes, and there is no guarantee that a specific attribute has current data, or even exists, at the time of calculation within any given transform. Referencing identity attributes within another identity attributeās calculation can lead to identity exceptions.
I can confirm that employementStatus is populated with data. I see it on all identities and in preview.
We wanted to use Identity Attributes because it would require us to āhard codeā a source name in the transform, which we prefer to avoid when possible.
Again, I want to emphasize for the third time that Sandbox works with the same data and same transform code. Please confirm if this works with your testing in Production before your next reply?
If we have no other choice, we will use an account attribute.
I can confirm I am testing using a production environment.
I do see that the attribute is called employementStatus with an e after employ and in your transform code you are pulling the identityAttribute employmentStatus without the e.
Is the transform you posted the one you are using or is that just a mixup in copying here to the forum?
Instead of specifying the input you can just use the OOB field mapping interface available in the front-end. Then as your first value (in place if your āidentityAttributeā transform) in your āfirstValidā you could use:
{
"attributes": null,
"type": "trim"
}
This should get around specifying either an Identity Attribute or hardcoding a source name in our transform.
I appreciate it but I donāt know what you mean by this since Iām still fairly new to IDN. Iāve had to learn quickly in the last 2 months. Perhaps you can provide an full code with your proposal and explain it again?
The problem as I understand it is that the first value in your nested āfirstValidā transform references an Identity Attribute. And the alternative that you stated was to use an āaccountAttributeā transform. But there is another option - to reference the value as it is configured in the front-end in the āIdentity Profileā configuration screen. The easiest way that I have seen is to call a ātrimā transform as a placeholder.
Huzzah! Iām so glad we were able to get you an answer, Peter! Donāt forget to checkout all of our docs on transforms, and please come back if you have any questions.
If you ever have feedback, for example something thatās missing from our docs, like us know over in the #community:feedback category!