Link to home
Start Free TrialLog in
Avatar of prasadp69
prasadp69

asked on

Concatenating @if statements

I have a question regarding nesting of @if statements.

I have two conditions to check for(country code & manager name). Like this, I have three countries to check for.

Then I need to concatenate these three conditions by nesting @if loops. When I put this for one country, it is working fine. I tried to use & in between these three categories for concatenation.

If there is any other way to check for these three categories please let me know. Thank you for your help in advance.


The code looks like this:

@If(@Name([CN]; @UserName)=@ProperCase(Mgr_Name) & @If (Country="Mexico");
@MailSend("xxxxxxxxxxxxx"; ""; ""; "Security Request "; " Please be advised that a Security Request has been approved and requires your attention,"; @NewLine + Purpose + "  Click here to access the security request.  ==>"; [IncludeDoclink]);@Prompt([OK];"Authorization Failure";"You are not authorized to approve this request"));

@If(@Name([CN]; @UserName)=@ProperCase(Mgr_Name) & @If (Country="Canada");
@MailSend("yyyyyyyyyyyy"; ""; ""; "Security Request "; " Please be advised that a Security Request has been approved and requires your attention,"; @NewLine + Purpose + "  Click here to access the security request.  ==>"; [IncludeDoclink]);@Prompt([OK];"Authorization Failure";"You are not authorized to approve this request"));

@If(@Name([CN]; @UserName)=@ProperCase(Mgr_Name) & @If (Country="United States");
@MailSend("zzzzzzzzzzzz"; ""; ""; "Security Request "; " Please be advised that a Security Request has been approved and requires your attention,"; @NewLine + Purpose + "  Click here to access the security request.  ==>"; [IncludeDoclink]);@Prompt([OK];"Authorization Failure";"You are not authorized to approve this request"));
ASKER CERTIFIED SOLUTION
Avatar of HemanthaKumar
HemanthaKumar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial