Author Topic: API call - Tag returns multiple values  (Read 10734 times)

didier.pironet

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
API call - Tag returns multiple values
« on: September 29, 2023, 12:20:33 am »
Hi,
We use Sparx APIs exposed on PCS to retrieve information out of Sparx DB and especially some tagged value types.
Although several values are available to pick up from, only a single value is 'registered' at any time and thus only a single value should come back to any API request.
However we have several tagged value types that return systematically 2 values and we don't understand why
Within Sparx EA fat client we see a single value assign to those behaving tags, making this issue even weirder...

Any idea what's going on here?

Thx for your help!

N.B. Sparx EA 16.1, PCS 5.1, Oracle DB



Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13240
  • Karma: +553/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: API call - Tag returns multiple values
« Reply #1 on: September 29, 2023, 01:12:06 am »
You probably actually have two different tagged values.
Look at the options in the tagged values section. You can change there whether or not to show duplicate tags.

The best way to make sure is to look in the database.

Code: [Select]
Select * from t_objectproperties tv
inner join t_object o on o.object_ID = tv.Object_ID
where tv.Property = 'registered'
and o.ea_guid = 'guid of the element'

Geert

didier.pironet

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: API call - Tag returns multiple values
« Reply #2 on: September 30, 2023, 02:17:31 am »
Hi Geert,
Indeed duplicate tags and to complicate things 'show duplicates' was tuned off in the fat client so we could not see them.
While these duplicates are returned with PCS/API calls (that's how we discovered the issue), they do not show up either when doing an export to csv file... Bug?

Is there a way to block this behaviour with a tag filter or else?

Thx a lot,

P.S.
I tried your SQL script but it did not return anything...
 


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13240
  • Karma: +553/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: API call - Tag returns multiple values
« Reply #3 on: September 30, 2023, 02:58:15 am »
Hi Geert,
Indeed duplicate tags and to complicate things 'show duplicates' was tuned off in the fat client so we could not see them.
While these duplicates are returned with PCS/API calls (that's how we discovered the issue), they do not show up either when doing an export to csv file... Bug?

Is there a way to block this behaviour with a tag filter or else?

Thx a lot,

P.S.
I tried your SQL script but it did not return anything...
 
What do you want to block exactly?

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: API call - Tag returns multiple values
« Reply #4 on: September 30, 2023, 05:40:56 am »
The only way to block duplicte creation is by writing an add-in. EA only offers to put them under the rug, which I think is a pretty silly way to handle it. You might send a feature request, but that's probably futile :-/

q.