cancel
Showing results for 
Search instead for 
Did you mean: 

Sort Function

Former Member
0 Kudos

Hi Experts,

Under my node functions in the mapping editor I do not have a Sort function...

Is it possible for someone to write me a code to do the same?

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

yes you can write the code of a generic sort function youself

(in an advanced user defined function)

or you can update the SP of your XI server (so it will have all new features)

BTW

writing it yourself will probably give you more flexibility

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi thank you... Unfortunately it did not solve it...

However I was able to come up with the code and here it is for anyone who needs a sort function and doesn't have SP13 or above...

Vector vID = new Vector();

for (int i=0; i<a.length; i++) {

if (!vID.contains(a<i>)) vID.add(a<i>);

}

Collections.sort(vID);

for (int i=0; i<vID.size(); i++) {

result.addValue((String)vID.get(i));

}

Former Member
0 Kudos

Could anyone answer my above questions?

Message was edited by:

SAP XI

Former Member
0 Kudos

Hi,

I think its available from SP 14 itself.

Did u try the last post i made in the last thread? It should solve the problem.

Regards,

P.Venkat

Former Member
0 Kudos

Michal is it possible for some code to do the same?

As I can only write simple functions and even then only decision type functions...

Former Member
0 Kudos

Also could you let me know from what SP the sort function is available... we are on SP12

Former Member
0 Kudos

sort function is available from SP13 onwards...

/people/stefan.grube/blog/2005/12/29/new-functions-in-the-graphical-mapping-tool-xi-30-sp13