Book a Demo

Author Topic: Duplicate tags  (Read 3927 times)

novikovigor

  • EA User
  • **
  • Posts: 46
  • Karma: +0/-0
    • View Profile
Duplicate tags
« on: June 18, 2013, 07:06:57 pm »
Hello! There is another problem.
I write transformation template, and there is an attribute, that has several tagged values:
Property => Olga
Property => Helga
If I check
Code: [Select]
%if attTag:"Property" == "Helga"% it returns false.
I guess "Helga" is overriden by "Olga"

So how can I check that there is "Helga" property value in tagged values?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Duplicate tags
« Reply #1 on: June 19, 2013, 08:27:31 am »
Code/transform templates will only get the value for one tagged value with any given name. (ie. You can't do it in the templates)

novikovigor

  • EA User
  • **
  • Posts: 46
  • Karma: +0/-0
    • View Profile
Re: Duplicate tags
« Reply #2 on: June 20, 2013, 05:39:30 pm »
Thank you, Simon.

novikovigor

  • EA User
  • **
  • Posts: 46
  • Karma: +0/-0
    • View Profile
Re: Duplicate tags
« Reply #3 on: June 21, 2013, 03:02:33 am »
I'm sorry but I have a trouble.
I can't continue to work, because I need to define all class attributes that have "Property=>Helga" in tagged values including duplicate tags. It's no matter how to define these attributes. Maybe there is auto-replacement "Property=>Helga" into "Helga=>Yes" or any other way that excludes necessity to edit duplicate tags manually? Maybe there is settings?
Ultimately I must define all the attributes, that had "Property=>Helga" tags including duplicate tags.
« Last Edit: June 21, 2013, 03:03:44 am by novikovigor »

AndyJ

  • EA User
  • **
  • Posts: 337
  • Karma: +5/-3
  • It's only a model
    • View Profile
Re: Duplicate tags
« Reply #4 on: June 21, 2013, 09:00:36 am »
Well... you could export everything to a .csv

Open the .csv in an editor or spreadsheet program

Search & Replace

Import the .csv back into the model.

If you have a lot of tags to change, this may help.

Please bear in mind that I haven't used this method for tagged values, but frequently use this method for other attributes.
Sun Tzu: "If you sit by the river long enough, eventually the body of MS Visio floats past."

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Duplicate tags
« Reply #5 on: June 21, 2013, 04:08:42 pm »
Or you write a small add-in/script, to change them over, or use my Simple VBA Excel to EA Importer as a basis to set the tagged values.

I would not recommend to try and change it all in the database directly. Too much chance you miss something and corrupt your model.

Geert

novikovigor

  • EA User
  • **
  • Posts: 46
  • Karma: +0/-0
    • View Profile
Re: Duplicate tags
« Reply #6 on: June 21, 2013, 08:09:30 pm »
Thanks! I've resolved this problem thanks to your advices by executing export/edit/import to xmi format.
AND IT WORKS!!! I'm happy!