Book a Demo

Author Topic: Referencing current ELEMENT in a SQL Fragment  (Read 4549 times)

OpenIT Solutions

  • EA User
  • **
  • Posts: 555
  • Karma: +9/-1
    • View Profile
Referencing current ELEMENT in a SQL Fragment
« on: August 16, 2013, 11:44:11 pm »
Hi,

I can see its possible to create a fragment that's source is an SQL query. If i add the fragment within an Element section within an RTF template is it possible to access the associated Element ID within the SQL query ? Is there some sort of tag like #Branch# that can be used to access the element id, ie somthing like #ELEMENT_ID# that i can add to my sql where clause ?

Regards,

Jon.

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: Referencing current ELEMENT in a SQL Fragment
« Reply #1 on: August 17, 2013, 12:19:15 am »
Hi,

I also missed the functionality of having the objectid at hand.

You can write a fragment script to collect the needed information. In the example.eap file you find an example to start from.

The drawback with fragment scripts is that on some PCs they work and on other they produce errors. I reported it to SPARX but still have no answer.

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

OpenIT Solutions

  • EA User
  • **
  • Posts: 555
  • Karma: +9/-1
    • View Profile
Re: Referencing current ELEMENT in a SQL Fragment
« Reply #2 on: August 20, 2013, 05:02:40 pm »
Hi,

Thanks for the pointer. I've now got an SQL Fragment that pulls back the raw data in need by using the #OBJECTID# tag in my where clause.

However i also need to display a diagram associated with the OBJECTID as a custom tag within my fragment. Is this possible ? Any pointers on this one anyone ?

Appreciate any help,

Regards,

Jon.