Book a Demo

Author Topic: Re: Tagged value  (Read 10541 times)

ocean1

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Tagged value
« on: January 15, 2016, 01:22:20 am »
Hi all,
I have a problem with tagged value. I want to exclude the tagged value for all attributes that contain this from report.
Its name #Property. I cant do this with options in template on “Element filters”.  I think that does not work in EA :(
Could anyone help me?
Thank you!

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Tagged value
« Reply #1 on: January 15, 2016, 07:23:35 am »
Hi all,
I have a problem with tagged value. I want to exclude the tagged value for all attributes that contain this from report.
Its name #Property. I cant do this with options in template on “Element filters”.  I think that does not work in EA :(
Could anyone help me?
Thank you!

Hi there, you should start your own thread with your question, not hijack someone else's.

In answer to what I think your question is, have you looked under Document Options | Element Filters | Add Filters | Attribute.AttTagValue ?

ocean1

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Tagged value
« Reply #2 on: January 15, 2016, 05:38:16 pm »
Hi all,
I have a problem with tagged value. I want to exclude the tagged value for all attributes that contain this from report.
Its name #Property. I cant do this with options in template on “Element filters”.  I think that does not work in EA :(
Could anyone help me?
Thank you!

Hi there, you should start your own thread with your question, not hijack someone else's.

In answer to what I think your question is, have you looked under Document Options | Element Filters | Add Filters | Attribute.AttTagValue ?

Yes, I saw it. But it doesnt work with any tag value's name and value.
Maybe someone saw the case like that.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Tagged value
« Reply #3 on: January 15, 2016, 05:57:21 pm »
If the standard template options don't really give you what you need you may want to consider an SQL template fragment.
The query could be as simple as
Code: [Select]
select tv.Property, tv.Value, tv.Notes as Memo from t_objectProperties tv
where tv.Object_ID = #OBJECTID#
and tv.Property not in ('#Property')

There's a pretty decent learning centre (ALT-F1) article about SQL template fragments if you don't know how they work.

Geert

ocean1

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Tagged value
« Reply #4 on: January 15, 2016, 10:05:42 pm »
If the standard template options don't really give you what you need you may want to consider an SQL template fragment.
The query could be as simple as
Code: [Select]
select tv.Property, tv.Value, tv.Notes as Memo from t_objectProperties tv
where tv.Object_ID = #OBJECTID#
and tv.Property not in ('#Property')

There's a pretty decent learning centre (ALT-F1) article about SQL template fragments if you don't know how they work.

Geert

Thank you for help. I am not good in SQL queries, but it does not work because tagged values is situated on the attributes. This query show only tagged value on object type.
But how can I report list of attributes in table like? :(



| Attribute Name | Attribute Type | Attribute Tagged Values      |
------------------------------------------------------------------
|    Address         |        String      |   #Property: PropertyValue  |
------------------------------------------------------------------
|       ...               |                        |                                            |
------------------------------------------------------------------
« Last Edit: January 15, 2016, 10:36:14 pm by ocean1 »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Tagged value
« Reply #5 on: January 15, 2016, 11:05:04 pm »
In that case you can use something similar to
Code: [Select]
select a.Name as Attribute,a.Type, tv.Property, tv.Value, tv.Notes as Memo
from (t_attributetag tv
inner join t_attribute a on tv.ElementID = a.ID)
where a.Object_ID = #OBJECTID#
and tv.Property not in ('#Property','AnotherTagToIgnore')

Geert


ocean1

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Tagged value
« Reply #6 on: January 18, 2016, 10:16:17 pm »
In that case you can use something similar to
Code: [Select]
select a.Name as Attribute,a.Type, tv.Property, tv.Value, tv.Notes as Memo
from (t_attributetag tv
inner join t_attribute a on tv.ElementID = a.ID)
where a.Object_ID = #OBJECTID#
and tv.Property not in ('#Property','AnotherTagToIgnore')

Geert

Thank you. But can I do it if template will be situate in table.


So how can I change the query?
I tried:
Code: [Select]
select tv.Property AS Name, tv.Value AS Value
from t_attributetag tv
inner join t_attribute a on tv.ElementID = a.ID
where a.ID = #AttributeID# and tv.Property not in ('#Property')
But it does not work :(
I must report some important documents, please help

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Tagged value
« Reply #7 on: January 18, 2016, 10:38:46 pm »
In that case you would have to replace the whole attribute table by a query, reporting all tagged values in one field.

Geert

ocean1

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Tagged value
« Reply #8 on: January 19, 2016, 12:21:21 am »
In that case you would have to replace the whole attribute table by a query, reporting all tagged values in one field.

Geert

I use the your query
Code: [Select]
select a.Name as Attribute,a.Type, tv.Property, tv.Value, tv.Notes as Memo
from (t_attributetag tv
inner join t_attribute a on tv.ElementID = a.ID)
where a.Object_ID = #OBJECTID#
and tv.Property not in ('#Property','AnotherTagToIgnore')

 and I get this (1st table). But I cant change query. I need table like 2nd table(

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Tagged value
« Reply #9 on: January 19, 2016, 12:29:33 am »
Your query should report only one row per attribute and concatenate the names and values for all tagged values into one field.

If you find it too complicated to do in SQL you might consider switching to a script fragment. For this case that would probably be easier as you then deal with each attribute separately iso working with resultsets.

Geert