Book a Demo

Author Topic: Default tagged value types  (Read 4163 times)

royvanmarrewijk

  • EA User
  • **
  • Posts: 61
  • Karma: +1/-0
    • View Profile
Default tagged value types
« on: August 27, 2015, 09:32:53 pm »
Hi,

I try to add a tagged value to elements which satisfies some conditions. The tagged value I want to add is a predefined tag which allows me to use a dropdown.

Within my Jscript I am able to add a tagged value to the element but when I use the name of the predefined tag and the default value of the predefined tag as value I will get a normal tagged value.

So the question is, how to add predefined values to an element via scripting.

kind regards,
Roy

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Default tagged value types
« Reply #1 on: August 28, 2015, 01:01:39 am »
What do you mean by "predefined"? I guess from your MDG. If so: try to supply the tag with FQN like <yourMDG>::<tagname>

q.

royvanmarrewijk

  • EA User
  • **
  • Posts: 61
  • Karma: +1/-0
    • View Profile
Re: Default tagged value types
« Reply #2 on: August 28, 2015, 06:42:36 pm »
Hi qwerty,

Within the Tag Values Window you can go to the 'Default Tagged Value Types' here you can view and edit tagged value types. This tagged value type is what I meant with predefined tagged values (sorry for my wrong definition).
In my case I created a tagged value type with an enum so it appears as a drop down in my tag values window. Now I would like to add this Tagged Value Type to multiple elements by using JScript.

I hope this explanation will make things clear ::)

Roy

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Default tagged value types
« Reply #3 on: August 28, 2015, 07:01:30 pm »
Hi Roy,

In that case I think it should be enough to have the name of the tagged value to correspond. Are you sure there's no typo somewhere?

Geert

royvanmarrewijk

  • EA User
  • **
  • Posts: 61
  • Karma: +1/-0
    • View Profile
Re: Default tagged value types
« Reply #4 on: August 28, 2015, 07:32:52 pm »
Ahh @#!^&@#, it was a typo indeed.  :(

Guys thanks for the replays, next time I will have a more valid question!

Have a nice weekend!
Roy