Author Topic: 1 to many tag value  (Read 2911 times)

jim_colorado

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
1 to many tag value
« on: August 29, 2018, 08:40:24 am »
What is the best way to create a 1 to many tag value? I thought I could use a CheckList but I have not gotten it to work.

For Example Values=Red, Blue, Green, Yellow;

I want to be able to select more than one value, for example, Red and Blue.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2901
  • Karma: +52/-3
    • View Profile
Re: 1 to many tag value
« Reply #1 on: August 29, 2018, 08:58:35 am »
You can't. However tagged value names don't have to be unique so you can have multiple single-selection tagged values. There is an option to view duplicate tags that you will need to turn on.
The Sparx Team
support@sparxsystems.com

jim_colorado

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: 1 to many tag value
« Reply #2 on: August 30, 2018, 03:45:55 am »
Thank you. I guess I am wasting my time trying to use CheckList.

David Rains (bioform)

  • EA User
  • **
  • Posts: 83
  • Karma: +0/-0
    • View Profile
Re: 1 to many tag value
« Reply #3 on: September 04, 2018, 03:41:53 am »
You can select multiple values for a tag value using the picker control with a tagged value... I sometimes use the concept of a taxonomy list to allow (taxonomy package with 2 stereotype classes (branch and leaf; leaf is type of branch) arranged in a tree hierarchy - then based on the need pointing to either branch (can then select both branch type and leaf) or only leaf)...

That could help...

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8195
  • Karma: +232/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: 1 to many tag value
« Reply #4 on: September 04, 2018, 04:36:55 pm »
You can select multiple values for a tag value using the picker control with a tagged value... I sometimes use the concept of a taxonomy list to allow (taxonomy package with 2 stereotype classes (branch and leaf; leaf is type of branch) arranged in a tree hierarchy - then based on the need pointing to either branch (can then select both branch type and leaf) or only leaf)...

That could help...
Sorry David, I don't understand anything you've said.  Can you rephrase?  In particular, can you indicate the resultant tagged value definition - such as:
Type=Boolean;
Default=True;

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

David Rains (bioform)

  • EA User
  • **
  • Posts: 83
  • Karma: +0/-0
    • View Profile
Re: 1 to many tag value
« Reply #5 on: September 06, 2018, 03:48:25 am »
Sorry, late night post... When I create a profile, I frequently use the stereotype connector for tagged-value and using the connector's target role, this results in the source element having a tagged value added with that roles name.

Class                               connector                              target rolename            Class
[cvTerm] ----------<tagged value>----------------------{glossaryMembership}->[cvGlossary]


When the profile is generated, dropping cvTerm class on diagram allows you to use the ... picker control to select the stereotype cvGlossary...
Type=RefGUID;Stereotypes=cvGlossary;

Setting the multiplicity on the role, will allow you to select multiples....

SO I use stereotypes for a taxonomy (package for the Taxonomy, class for the Entry in the Taxonomy)
taxPackage.Colors; taxEntry: Red; taxEntry: Yellow; taxEntry: Green (placed under Colors)

use the same approach, set your multiplicity on the role for your selection (e.g. ColorChoices)
Access the TV click the "..." to activate the picker, use the Ctrl key to allow multiple selections... navigate and select...

Sometimes in a Taxonomy, you might have Category and Entry (leafs)... Example in my Taxonomy for Non-Functional Requirement Types, I only allow for the selection of a leaf, but I want the taxonomy to have depth.... so I use class stereotypes of category and entry... restrict to Entry if you want them to select a Leaf, restrict to Category if you want them to have both.... Leaf is specialized into Category.... (so they can pick either...)

DOES that make it clearer?  I would have included a picture, but can't figure out how to do that?!! 

NOTE: KP Posted the steps for the tagged-value way to select multiple elements via the GUID way back in 2013 (copied steps from that post)
1. Go Settings > UML Types > Tagged Values Types and create a new tagged value type called "locations" with detail "Type=RefGUIDList;Values=Class;Stereotypes=Location;"
2. Create a package with Ā«profileĀ» stereotype. Give it a diagram.
3. On the diagram, drop a stereotype element with an extends association to a metaclass element. When the dialog appears for the metaclass, choose "Requirement".
4. Give the stereotype class an attribute named "locations".
5. Save the profile.
6. Go Tools > Generate MDG Technology File and follow the wizard's instructions. When asked what to include in the technology, tick the options for Profiles and Tagged Value Types. Select the profile saved in step 5 and the tagged value type saved in step 1.
7. Go Settings > MDG Technologies > Advanced > Add > Add Path and add the path where you saved your technology file.
8. Find your profile in the toolbox and drop a stereotyped requirement on a diagram: it should have your RefGUIDList tagged value.

The taxonomy stuff above is pretty basic stuff Package, containts elements, the steps above to create the taggedvalue to do the multiselect just has to be modified to constrain you to the stereotype of the element you are using to represent the available choices... KP used :"locations", my example was "colors"
« Last Edit: September 07, 2018, 04:23:35 am by David Rains »

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1366
  • Karma: +110/-75
    • View Profile
Re: 1 to many tag value
« Reply #6 on: September 06, 2018, 08:08:47 am »
Picture would be good.  You stick it on some kind of public host and use a link to it.  Please not Dropbox tho' as I can't see Dropbox from my work computer.