How to create an Extension Rule with other types different from the basic types? - Forum - Corticon - Progress Community

How to create an Extension Rule with other types different from the basic types?

 Forum

How to create an Extension Rule with other types different from the basic types?

This question is answered

What I need is to create something like:

- collection -> sortedBy (attribute)

- the string -> at (elementIndex) - in this case I would like to create a method that gives first element in the list that respects some conditions -> firstWhere (attribute).

I searched but did not find anything that could help me.

If someone could provide me with the "sortedBy" and "at" functions it would be great because I think it would cover all my doubts.

Thanks,

Ricardo Jorge

Verified Answer
  • You could write an extended operator that takes in a collection and some type of filter criteria, however you can also accomplish the same with just rules.

    This example takes a list of customers, filters for those that are in the State of CA, sorts by age, and then returns the 3rd youngest.

    The complete projects is here:

    4300.SortedPosition.zip

All Replies
  • You could write an extended operator that takes in a collection and some type of filter criteria, however you can also accomplish the same with just rules.

    This example takes a list of customers, filters for those that are in the State of CA, sorts by age, and then returns the 3rd youngest.

    The complete projects is here:

    4300.SortedPosition.zip

  • Ok, I can do it with the filters.

    Thanks.