Posted: 15 Feb 2017 10:55 EST Last activity: 7 Mar 2017 2:03 EST
Compare a property value in 2 different pagelists of same class
Hi, I have a requirement where I need to check if a property value in pagelist1 is in any page of Pagelist2. Please note that both the pagelists are of same class and I need to check the same property value in both the pagelists if they are same or not.
Is there any OOTB function to verify this ?
EX:- P1.a1, P2.a1 properties are of page list 1 and I need to check if these property values are in P2.a1, P2.a1, P3.a1, P4.a1
***Updated by moderator: Lochan to add Categories***
The easiest way would be to iterate through Pagelist1 and within the iterator, iterate through Pagelist2 to compare. Obviously, this doesn't scale, so if you have really large pagelists, you might want to get more creative. In that case, we can start asking questions like, will value of a1 be repeated, or if you find a match, can you remove the entire page from Pagelist2 from consideration? If so, you might be able to use things like page-remove to prune the list as you go. Assuming you don't need Pagelist2 later. That said, I'm not aware of any OOTB functionality to do this comparison for you, so one way or another I think you'll need to build it yourself.
Thanks guys for your responses. Actually, I can't use an activity or datatransform as I need to use this in a when rule as a visibility condition so I wanted to know if there is any OOTB function to compare both the pagelist values.