Hi, I need the output as an email of username. I have tried create an expre

Hi,
I need the output as an email of username. I have tried create an expression rule below but getting the below error. Could anyone suggest regarding the issue in the expression rule and correct me what needs to be updated.
=if(and(not(rule!APN_isEmpty(ri!user)),isusernametaken(ri!user)),user(touser(ri!user),"firstName") & " " & user(touser(ri!user),"lastName"),"NA")
Problem: An invalid expression has been encountered in a task.
Details: ERROR:An error occurred while evaluating expression: =rule!prmFormatUserAsEmailAddress() (Expression evaluation error in rule 'prmformatuserasemailaddress': Rule 'prmformatuserasemailaddress' has 1 parameters, but instead passed 0 parameters.) (Data Inputs)

OriginalPostID-145357

OriginalPostID-145357

  Discussion posts and replies are publicly visible

Parents
  • Currently the model is using a PV projectmetadata to get the email address. I would like to modify this PV and instead we want to create an expression rule like prmFormatUserAsFirstLast to get the email address then we can reference the rule in the process model.
    For this I have created a expression rule prmFormatUserAsFirstLast

    =if(and(not(rule!APN_isEmpty(ri!user)),isusernametaken(ri!user)),user(touser(ri!user),"firstName") & " " & user(touser(ri!user),"lastName"),"NA")
    but getting the error.

    Could you suggest what needs to be added so that I get an email address here.
Reply
  • Currently the model is using a PV projectmetadata to get the email address. I would like to modify this PV and instead we want to create an expression rule like prmFormatUserAsFirstLast to get the email address then we can reference the rule in the process model.
    For this I have created a expression rule prmFormatUserAsFirstLast

    =if(and(not(rule!APN_isEmpty(ri!user)),isusernametaken(ri!user)),user(touser(ri!user),"firstName") & " " & user(touser(ri!user),"lastName"),"NA")
    but getting the error.

    Could you suggest what needs to be added so that I get an email address here.
Children
No Data