WorkFlow Syntax
I have a requirement, where I need to check between the opportunity owner role and the current user's role who is accessing the opportunity. If there is a mismatch I have updated a field which will eventually set a validation.
The condition which I gave under the workflow "Before modified workflow" under opportunity object is as below and its working
(Left(JoinFieldValue('<User>',JoinFieldValue('< Opportunity >',[<OpportunityId>],'<OwnerId>'),'<Role>'),2) = 'AA') AND (Left(UserValue('<Role>'),2) <> 'BB')
I also tried (Left(JoinFieldValue('<User>',[<OwnerId>],'<Role>'),2) = 'AA') AND (Left(UserValue('<Role>'),2) <> 'FM') but this did not work for some reasons.