MIM WAL: Mathematics and MultiValue attributes

The Case

I have a multivalue attribute attrib1, I want to find out if the any of the items in that list is contained in another multivalue attribute attrib2. The Contains function of the MIM WAL will not help because I am dealing with 2 list attributes.


A basket X contains 2 types of fruits and a total of 10 fruits. Basket Y contains 2 types of fruit and a total of 10 fruits. Do both baskets have the same types of fruit? Thats an interesting puzzle.

If we make a rule that only dissimilar fruits can subtract each other then

X – Y = K  and K = X if the baskets are exactly the same


Lets use the same mathematical principle.

InsertValues([//Target/attrib1]) => $K

InsertValues([//Target/attrib1]) => $X

InsertValues([//Target/attrib2]) => $Y

RemoveValues($Y) => $X

IIF(Eq(Count($K),Count($X)), “We are the same”, “We are not same”)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s