Problem with code - Trying to open a certain page based off of users mailbox

What I am trying to do is open up a particular page based off where a user’s mailbox is. I put code in the frame’s content and under Formula for name of frame content I put in the code below. It is always choosing the default which is Pepper Database Index PCCBAR no matter where the user’s mailbox is. If someone know what i am doing wrong I would greatly appreciate it.

Thanks in advance,

John

ms = @Name([CN];@Subset(@MailDbName;1));

dept = @Name([OU1];@UserName);

@If(dept = “IS Dept”;“Pepper Database Index IT”;ms = “PCCCHI”; “Pepper Database Index PCCCHI”; ms = “PCCTIN”; “Pepper Database Index PCCTIN”; ms = “PCCINDY”; “Pepper Database Index PCCINDY”; “Pepper Database Index PCCBAR”)

Subject: Problem with code - Trying to open a certain page based off of users mailbox

@Subset(@MailDbName;1) returns a fully-canonical server name. Try @Name([CN];@Subset(@MailDbName;1)).

Subject: RE: Problem with code - Trying to open a certain page based off of users mailbox

Steve-

That is the code I am using right now which is @Name([CN];@Subset(@MailDbName;1)). I even put the formula in a form and I am seeing that it is outputing PCCINDY,PCCCHI,PCCTIN.

Thanks,

John