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];"Auth orization 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];"Auth orization 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];"Auth orization Failure";"You are not authorized to approve this request"));
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
@MailSend("xxxxxxxxxxxxx";
@If(@Name([CN]; @UserName)=@ProperCase(Mgr
@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(
@If(@Name([CN]; @UserName)=@ProperCase(Mgr
@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(
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.