Book a Demo

Author Topic: Use <Search Term> from a script  (Read 3301 times)

emiliano.davila

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Use <Search Term> from a script
« on: May 10, 2023, 11:25:46 pm »
Hi, we need to use the <search term> entered in the search window during the execution of a JS script. This works in a SQL query (query builder), but the same query doesn't work from a search script. Does anyone know if this is possible? I checked the Sparx Systems documentation and couldn't find anything about it.

I leave an example below

SELECT o.OBJECT_ID AS SERVER__ID,
                p.PACKAGE_ID AS SERVER__SALA
                FROM t_object AS o
                JOIN t_objectproperties AS op
                ON op.VALUE = '<Search Term>'
                JOIN t_package AS p
                ON p.PACKAGE_ID = o.PACKAGE_ID
                WHERE o.OBJECT_ID = op.OBJECT_ID

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Use <Search Term> from a script
« Reply #1 on: May 10, 2023, 11:52:28 pm »
no, you can use the search term.

Solution: get the input from the user yourself, and replace the <Search Term> in the script with the input from the user.

VBScript has inputbox, and I believe there are workarounds for Jscript and Javascript to call this VBScript function as well.

Geert