Hello Jan,

I believe you can use dash:constructors for this, see 
https://archive.topquadrant.com/doc/latest/ext/points.html#constructors

Constructors are used whenever someone attempts to create a new instance using 
the New buttons of a class that declares a constructor. You need to implement 
the actual logic in JavaScript. (If you are not familiar with that, TQ can help 
you with professional services).

Keep in mind though that relying on a specific numbering order may be fragile, 
e.g. if two people are working in parallel on workflows and instances get added 
without knowing about each other. That's why some customers prefer using UUIDs 
to create unique identifiers.

Holger


> On 15 Apr 2024, at 5:11 PM, Jan Campschroer <campschr...@planet.nl> wrote:
> 
> I've got the following situation:
> a reference dataset  RD-Merk
> a class ont-merk:Merk with
> instances of Merk are elements in RD-Merk
> a property ont-merk:ID (integer) (min count = max count =1)
> a property M_ID (min count = max count =1)
> with the property dash:uriStart "http://data/politie/merk/";
> this value is used to create the URI's of the instances of class Merk.
> the value of M_ID is based on the value of ID following this pattern:
>  1 --> "M00001"
> 998 -> "M00998"
> Question: If a new Merk is added in RD-Merk, 
> the value of ID should be the max of existing ID's in RD-Merk plus 1.
> the value of M_ID should be generated 
> How to build this in the UI of RD-Merk?
> Is this possible using the URI Construction Rules on the Manage Tab?
> 
> grz Jan
> 
> -- 
> The topics of this mailing list include TopBraid EDG and related technologies 
> such as SHACL.
> To post to this group, send email to topbraid-users@googlegroups.com
> --- 
> You received this message because you are subscribed to the Google Groups 
> "TopBraid Suite Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to topbraid-users+unsubscr...@googlegroups.com 
> <mailto:topbraid-users+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/bf08d766-1805-4f66-a6f4-878fb64051cbn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/bf08d766-1805-4f66-a6f4-878fb64051cbn%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to topbraid-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/FACF077E-04F2-4270-8732-CE329C854ED8%40topquadrant.com.

Reply via email to