I wish to be able to add additional user field value entries when a user creates new resources in edg. Or otherwise enforce that these values are added at creation. It is not quite sufficient to use just the usual shacl constraints for min count of values on forms, after the resource has already been created.
My use case is for example if I've defined a class with a set of attributes and I would like to present selected attributes to the user that must be completed when a new instance of that class is created.
According to the source code, the dialog will show all fields that have minCount > 0 or have dash:propertyRole dash:IDRole. See http://datashapes.org/propertyroles.html#IDRole
I guess none of those mechanisms would fit for your properties?
If they must be entered, then why not use sh:minCount 1?
In general, I have to say I am not a fan of offering too much
redundancy here; too many ways of achieving the same things. Once
a resource is created, it will be shown on the form and in edit
mode. Can you help me understand why that wouldn't be enough?
Ideally I would also like to trigger a swp script or other triple rule to run some other entailed graph work when the resource is created. At present we are relying on the transform tab to run rules manually or sparql queries but this is sub optimal.
Open teamwork.ui.ttlx and look at teamwork:IncrementCounterEditRule for an example of an EditRule. These SWP scripts can check ui:addedGraph to see which new rdf:type triples (i.e. which new instances) have been created. You could then perform post-processing actions depending on the type.
Many thanks in advance
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-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/819134e9-4e5b-4d3c-9a31-a9137aad41e1n%40googlegroups.com.