Hi everyone,
I have the following SAIL expression:
a!textField( label: "Nome", labelPosition: "ADJACENT", value: if(isnull(ri!policyCustomerInformation.policyCustomerName), "", rule!CR_getUserFirstName(ri!policyCustomerInformation.policyCustomerName)), readOnly: true)
When I try to use an expression rule to retrieve the user firstname an error is triggered. Is it possible to call an expression in SAIL that call the user function to retrieve one user property?
Thanks in advance
Discussion posts and replies are publicly visible
You can absolutely use user function on SAIL. The reason for error could be from user not exists or other reasons, try to match your rule CR_getUserFirstName to the below code to handle edge case (CR_getUserFirstName input type "User")
if( isnull( ri!policyCustomerName ), "", if( isusernametaken( ri!policyCustomerName ), user( ri!policyCustomerName, "firstName" ), tostring( ri!policyCustomerName ) ) )