Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Comparing 2 string values

Avatar

Avatar
Validate 1
Level 1
associationp157
Level 1

Like

1 like

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
associationp157
Level 1

Like

1 like

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
associationp157
Level 1

13-11-2017

Hello

I'm stuck with something that should have been easy to do: I need to compare 2 values and do different things depending on the result.

The 2 values type are string.

My first idea was to use a simple "equal" condition in the filtering window.

But checking the result, I realised that 2 empty field were seen as "non-equal" whereas they should have been equal.

I tried to use the IfEquals function but no luck as well

Any idea how to simply check if 2 fields as identifical  ? Assuming that a null field is equivalent to an empty field ?

Thanks for your insights

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 50
Employee
shrawans3153003
Employee

Likes

69 likes

Total Posts

150 posts

Correct Reply

66 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Boost 50
Employee
shrawans3153003
Employee

Likes

69 likes

Total Posts

150 posts

Correct Reply

66 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 25
Boost 10
View profile
shrawans3153003
Employee

13-11-2017

Hello,

You can use a case construct to compare two null values in filtering conditions

For example I am comparing first name and last name on equal operator

Case(When(Lower(@firstName) IS NULL , 'Null') , Else(Lower(@firstName))) =  Case(When(Lower(@lastName) IS NULL , 'Null') , Else(Lower(@lastName)))

Above condition will return recipient records where firstname is equal to lastname or both firstname and lastname are null

Answers (2)

Answers (2)

Avatar

Avatar
Validate 1
Level 1
sivaramakumar_P
Level 1

Likes

2 likes

Total Posts

20 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
sivaramakumar_P
Level 1

Likes

2 likes

Total Posts

20 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
sivaramakumar_P
Level 1

11-12-2017

Can you able to share some sample code which you used.. did you tried in sys filters or some other attributes of schema?

Avatar

Avatar
Validate 1
Level 1
associationp157
Level 1

Like

1 like

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
associationp157
Level 1

Like

1 like

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
associationp157
Level 1

14-11-2017

Thanks for your help, it works fine !