I am trying to take in a parameter from the user that can be used as the
object. In this example it would be for the category. I added the parameter
like below, but I keep getting the error "Not a JSON string". I want to be
able to get a drop down where the user selects the category and then it is
added as the triple. I am able to populate the drop down but it keeps
giving an error when selecting "Okay" to add the triple. My potential use
case is actually use this to bulk add a blank node but first trying to get
the parameter part working first and resolve the "Not a JSON string".
dashjs: """focusNodes.forEach(node => node.add(graph.node({qname:
"ex:category"}), graph.node(category)))""";
sh:parameter ex:Concept-categoryParameter
ex:Concept-categoryParameter
a sh:Parameter;
sh:path ex:category ;
sh:class ex:Category ;
sh:name "category" ;
sh:nodeKind sh:IRI ;
sh:description "Concept Category" ;
.
On Monday, March 18, 2024 at 4:04:46 PM UTC-6 Marie Valadez wrote:
> Hello Holger,
>
> I am looking into BatchActions and only seemed to find a snippet in the
> documentation where it says it is the similar to
> dash:ModifyActions/dash:ExploreActions (
> https://archive.topquadrant.com/doc/7.8/scripting/actions.html?highlight=batchaction).
>
> I have a dash:ModifyActions instance that works, but tried to implement a
> similar case for dash:BatchAction to see if I can essentially take the
> action from dash:ModifyActions and apply it to multiple instances. However,
> I don't seem to even find it populating under the Batch Actions Menu. I am
> trying to test it out in EDG Studio version 7.8. Is there something I am
> missing with how to implement??
>
> Here is an example of the script:
>
> ex:Concept
> a owl:Class ;
> a sh:NodeShape ;
> dash:resourceAction exsh:CategoryBatchAction ;
> ...
>
> exsh:CategoryBatchAction
> a dash:BatchAction ;
> dash:actionGroup exsh:CategoryActionGroup ;
> dash:actionIconClass "fas fa-plus" ;
> dash:canWrite true ;
> dash:js """
> focusNode.add(graph.node({qname: "ex:category"}),
> graph.node({qname: "ex_graph:_123"}))""" ;
> rdfs:comment "Add `example category to the concept" ;
> rdfs:label "Example Category Batch Action" ;
> sh:order 0 ;
> ...
>
--
The topics of this mailing list include TopBraid EDG and related technologies
such as SHACL.
To post to this group, send email to [email protected]
---
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/07d898d5-c816-4e61-9289-e0444833e3een%40googlegroups.com.