Sparx Systems Forum

Pro Cloud Server / Prolaborate / WebEA => PCS General Board => Topic started by: didier.pironet on September 29, 2023, 12:20:33 am

Title: API call - Tag returns multiple values
Post by: didier.pironet 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


Title: Re: API call - Tag returns multiple values
Post by: Geert Bellekens 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
Title: Re: API call - Tag returns multiple values
Post by: didier.pironet 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...
 

Title: Re: API call - Tag returns multiple values
Post by: Geert Bellekens 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
Title: Re: API call - Tag returns multiple values
Post by: qwerty 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.