Book a Demo

Author Topic: Create a Collection in JScript  (Read 3890 times)

SvenK

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Create a Collection in JScript
« on: January 07, 2013, 07:27:10 pm »
Hello,

Repository.GetElementSet can be used to make an SQL-Query and returning a list of found elements as collection. As this function wont work for connectors, I'm implementing a similar function using Repository.SQLQuery. My function should behave similar to Repository.GetElementSet and, therefore, shall return also a collection of found connectors.
How can I create a new collection and populate it with existing connectors (not Collection.AddNew()).

Regards
Sven


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Create a Collection in JScript
« Reply #1 on: January 07, 2013, 08:52:24 pm »
Sven,

You have to use a native collection (List or whatever) i.s.o. the EA.Collection.

Geert

SvenK

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Create a Collection in JScript
« Reply #2 on: January 07, 2013, 10:46:07 pm »
Hi Gert,

thanks for the information.
Not the nicest solution but I'm now using Arrays.

Sven