Hello,
Please use the following from the wiki: https://wiki.axiossystems.com/assyst11-6Wiki/index.php/Task_Expressions_in_an_Approvals_Workflow_Worked_Example#Manager_Approval
if ($new.affectedUser.manager.assystUserAliasShortCode = $NO_VALUE, $CURRENT_VALUE, $new.affectedUser.manager.assystUserAliasShortCode)
Kind regards,
Michael
Either should work - the properties they reference are synonymous. The manager is of the type contactUserDto
which has an assystUserAliasShortCode
and an assystUserAlias
(which is of the type assystUserDto
and has a shortCode
property).
However they will have different outcomes. Your example Michael will assign to the affected user’s manager (if there is one) whereas raza-mq’s expression will assign to the affected users manager (if there is one) only if the affected user’s manager has a manager
raza-mq’s expression:
if ($new.affectedUser.manager.manager.assystUserAlias.shortCode = $NO_VALUE, $CURRENT_VALUE, $new.affectedUser.manager.assystUserAlias.shortCode)
Michael’s expression:
if ($new.affectedUser.manager.assystUserAliasShortCode = $NO_VALUE, $CURRENT_VALUE, $new.affectedUser.manager.assystUserAliasShortCode)
The original request was for “approval from Manager of Manager (VP)” so either:
if ($new.affectedUser.manager.manager.assystUserAlias.shortCode = $NO_VALUE, $CURRENT_VALUE, $new.affectedUser.manager.manager.assystUserAlias.shortCode)
or
if ($new.affectedUser.manager.manager.assystUserAliasShortCode = $NO_VALUE, $CURRENT_VALUE, $new.affectedUser.manager.manager.assystUserAliasShortCode)
Should work.