If your ‘$onboarding/Code’ is a string then you can use an expression like this:
if $onBoardingstaff/code= 'CWO' then 'WareHouse Coordinator' else
if $onBoardingstaff/code='CWN' then 'Warehouse Controller' else
But if ‘$onboarding/Code’ is an enum, then, an expression like this can help:
if $onBoardingstaff/code= enum.staffcode.CWO then 'WareHouse Coordinator' else
if $onBoardingstaff/code=enum.staffcode.CWN then 'Warehouse Controller' else
Let me know, if you have any issues,
Hope it helps!!
you can use event handler in use onchange action call a microflow then using change object change another dropdown based on current dropdown value give refresh in client it will work.
As your attribute ‘code’ is an enum and you’re equating it to the string, mendix is throwing an error in that case which is invalid types on LHS and RHS
Instead you can write it in this way
where you are equating the attribute to its own expected enum values instead of strings.
This also makes sure that there are no typos.