Book a Demo

Author Topic: Create Custom Reference Data  (Read 5349 times)

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Create Custom Reference Data
« on: July 25, 2023, 05:57:01 pm »
Hey all

When creating a Reference Data Tagged Values, you are able to base them on the Predefined Reference Data Types (e.g., Authors, Cardinality, Clients, etc...).
However, is it possible to:

1. Create a CUSTOM Reference Data, and then
2. Create a Reference Data Tagged Value that references that CUSTOM Reference Data?

I've looked and looked at how to create such custom reference data, but can't find any way. Is there one?

Cheers

Jays :-)

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Create Custom Reference Data
« Reply #1 on: July 26, 2023, 08:39:37 am »
I'm not entirely sure what you're wanting.


Predefined Reference Data Types
are an enumeration tagged value type where instead of manually specified values the values come from a list that comes from global model data with a function of Enterprise Architect to edit them. I can't see how you even could have a custom version of that because there wouldn't be functionality to edit them.

If you want a custom list, you can use just a regular enumeration type tagged value.
Code: [Select]
Type=Enum;
Values=Val1,Val2,Val3;
Default=Val2;

If you want to select from options that you can edit, I'd recommend that you use a RefGUID type tag to a custom stereotype. You can then create objects with the total set of options that you want to select from.
Code: [Select]
Type=RefGUID;
Values=Type1,Type2;
Stereotypes=Stereotype1;

Personally, I'd recommend going with the RefGUID approach. It allows all of Enterprise Architect's modelling strength for the values instead of just having a flat list somewhere. The main down-side is that the UI of selecting from a drop-down is simpler.

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Create Custom Reference Data
« Reply #2 on: July 30, 2023, 07:41:35 am »
"Predefined Reference Data Types are an enumeration tagged value type where instead of manually specified values the values come from a list that comes from global model data with a function of Enterprise Architect to edit them. I can't see how you even could have a custom version of that because there wouldn't be functionality to edit them."

Yes, that was precisely my question.
That is, is there a way to edit them and if I could break into the database and edit them, would Sparx even recognise the new data type?

That is, if I hacked the EA database and created a new set of custom data called "Robots" with the following values {Wall-E, R2D2, C3PO}, could I then create a Predefined Data tagged value with list=Robots and have it show these values?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Create Custom Reference Data
« Reply #3 on: July 31, 2023, 08:11:12 am »
That is, if I hacked the EA database and created a new set of custom data called "Robots" with the following values {Wall-E, R2D2, C3PO}, could I then create a Predefined Data tagged value with list=Robots and have it show these values?
No.

DeBAAT

  • EA User
  • **
  • Posts: 64
  • Karma: +2/-0
    • View Profile
Re: Create Custom Reference Data
« Reply #4 on: July 31, 2023, 05:00:27 pm »
Hai Jayson,
If you are looking for an option to automatically generate the list of values to use on a legend, maybe my script could be of help.
See the topic "https://sparxsystems.com/forums/smf/index.php/topic,46615.msg278990.html".