Book a Demo

Author Topic: Bind a text with a field in template of document  (Read 4571 times)

AlexanderX

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Bind a text with a field in template of document
« on: July 24, 2015, 05:06:06 pm »
Hi!

For example:
Fragment 'Features' has text and field 'Alias: {Att.Alias}'.
If {Att.Alias} is empty then the text 'Alias: ' don't display in report.
How is it done?

Thank You!
« Last Edit: July 24, 2015, 05:30:01 pm by AlexanderX »

OpenIT Solutions

  • EA User
  • **
  • Posts: 555
  • Karma: +9/-1
    • View Profile
Re: Bind a text with a field in template of docume
« Reply #1 on: July 24, 2015, 05:08:11 pm »
I believe you can use a fragment to achieve conditional inclusion of text and a field value.

AlexanderX

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Bind a text with a field in template of docume
« Reply #2 on: July 24, 2015, 05:15:29 pm »
'Fragments' are parts of templates. How to make a condition between text and field?
I just want to repeat this mechanism of the system template.
« Last Edit: July 24, 2015, 05:52:50 pm by AlexanderX »

OpenIT Solutions

  • EA User
  • **
  • Posts: 555
  • Karma: +9/-1
    • View Profile
Re: Bind a text with a field in template of docume
« Reply #3 on: July 25, 2015, 01:06:19 am »
Create a fragment with custom sql that uses the #OBJECTID#. If the SQL returns no data the fragment body will not be included in your report.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Bind a text with a field in template of docume
« Reply #4 on: July 27, 2015, 08:54:06 am »
It's done via bookmarks.

Specifically, there is one called Att.Alias.Start at the start of the line. Another Att.Alias.End as the first character of the next line.

It's described in the help page: hyperlinks_and_bookmarks.html

AlexanderX

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Bind a text with a field in template of docume
« Reply #5 on: July 27, 2015, 03:42:16 pm »
Thank you very much!