PDA

View Full Version : Making a rule so it's not case sensitive


dalespivey
July 18th, 2014, 04:55 AM
Here's the challenge. If the person at office A, is the same person at office B, then return something else.

Here's my wish. I want my rule below to work when Office A is Mike and Office B is MIKE. I want Mike = MIKE. Thanks!

if (Field("RespondentName") == Field("HeadName"))
{
return "<span>" + TaggedDataField("HeadAgencySur");
}
else
{
return "<span>" + TaggedDataField("HeadName") + "</span>";
}
return "";

step
July 18th, 2014, 05:32 AM
Just convert both to all lowercase in the condition:

if (ToLower(Field("RespondentName")) == ToLower(Field("HeadName")))
{
return "<span>" + TaggedDataField("HeadAgencySur");
}
else
{
return "<span>" + TaggedDataField("HeadName") + "</span>";
}

dalespivey
July 18th, 2014, 05:37 AM
And it works, Thanks!