Error - convertor should take exactly one parameter of type string
New to Mendix and I am sure this must have been asked before but since couldn’t search an answer I am posting it here. While doing the exercise of Mendix Crash course I am facing this challenge. Link here. I have created a JSON structure where I have an attribute “Jobtitle” of type string which I am mapping to an enum “Jobtitle” using import mapping and using following code in the decision shape of the convertor. $Jobtitle = toString(UserManager.Enum_Jobtitle.Nurse) to produce the outcome. However I am getting following error – “convertor should take exactly one parameter of type string” in the import mapping rule.
Can you show the micro flow, it seems that the problem is in the input parameter definition.
Hi Piyush, instead of using toString(UserManager.Enum_Jobtitle.Nurse) use getCaption(UserManager.Enum_Jobtitle.Nurse).