Error - convertor should take exactly one parameter of type string

0
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.
asked
2 answers
0

Can you show the micro flow, it seems that the problem is in the input parameter definition.

Alessandro

answered
0

Hi Piyush, instead of using toString(UserManager.Enum_Jobtitle.Nurse) use getCaption(UserManager.Enum_Jobtitle.Nurse).

 

This will get the string value ‘Nurse’.

answered