cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Translate the entire conversation x

Info*Engine remove duplicates in a group

rkassmeyer
12-Amethyst

Info*Engine remove duplicates in a group

I just thought I would drop a note here, since I was not able to find anything useful myself when looking for a solution around this: "I have a group with duplicates how do I remove them, it is adversely effecting a join?"

I have come up with this solution that seems to be straightforward, use it if you like it.

EXAMPLE:

 

<?xml version="1.0" standalone="yes"?>
<%@page language="java" access="http"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core" prefix="ie"%>
 
<ie:webject name="Create-Group" type="GRP" >
      <ie:param name="DELIMITER" data="," />
      <ie:param name="ELEMENT" data="obid=A,color=red" />
      <ie:param name="ELEMENT" data="obid=A,color=red" />
      <ie:param name="ELEMENT" data="obid=A,color=red" />
      <ie:param name="ELEMENT" data="obid=B,color=blue" />
      <ie:param name="ELEMENT" data="obid=B,color=blue" />
      <ie:param name="GROUP_OUT" data="DUPLICATES" />
</ie:webject>
 
<ie:webject name="Create-Group" type="GRP" >
      <ie:param name="GROUP_OUT" data="UNIQUE" />
</ie:webject>
 
<ie:forEach groupIn="DUPLICATES" groupOut="ROW" >
      <ie:webject name="Union-Groups" type="GRP" >
            <ie:param name="GROUP_IN" data="UNIQUE" />
            <ie:param name="GROUP_IN" data="ROW" />
            <ie:param name="UNIONBY" data="obid" />
            <ie:param name="GROUP_OUT" data="UNIQUE" />
      </ie:webject>
</ie:forEach>
 
NOTE: This only compares the data on the attribute "obid", no other values are considered.
0 REPLIES 0
Announcements
Top Tags