Sorry I didn’t notice that the value of resources is supposed to be a space-separated list of URIs only. So instead of that array of NamedNodes, just try a single string with spaces in between URIs…
Holger > On 9 May 2024, at 4:46 PM, Marie Valadez <mevalade...@gmail.com> wrote: > > Hello Holger, > > Thanks for the response. I followed your instructions and tried using the > code within the ScriptEditor and from within an ExploreAction. However, in > both cases I returned the same error message. > <image.png> > Here is what I did from within the ScriptEditor: > tbs.loadRemoteResources({ > forced: true, > maxDepth: 5, > maxSeconds: 600, > resources: [ graph.namedNode('http://example.com/CON_123456')] > }) > > Also tried: > tbs.loadRemoteResources({ > forced: true, > maxDepth: 5, > maxSeconds: 600, > resources: [ graph.namedNode({qname: 'ex:CON_123456'})] > }) > > After receiving the error, thought maybe it doesn't work in the ScriptEditor > so tried as a resource action. > ex:ConLoadResource > a dash:ExploreAction ; > dash:actionGroup ex:ExploreActionsGroup ; > dash:actionIconClass "fa-solid fa-list" ; > dash:js """tbs.loadRemoteResources({ > forced: true, > maxDepth: 5, > maxSeconds: 600, > resources: [ graph.namedNode('http://example.com/CON_123456')] > })""" ; > rdfs:label "Test Load Resource" ; > sh:order 1 ; > . > > Any tips on how to get this working to be used within an Explore Action, > Modify Action, Batch Action, and script constraints? Is there some additional > context that I am missing for it to be applied? > > Thank you! > > Marie > > On Thu, May 9, 2024 at 1:37 AM Holger Knublauch <hol...@topquadrant.com > <mailto:hol...@topquadrant.com>> wrote: >> Hi Marie, >> >> the syntax of that function in JS requires a JS object as its sole argument. >> So it would look like >> >> tbs.loadRemoteResources({ >> forced: true, >> resources: [ graph.namedNode('http://example.com/CON_123456') ] >> }) >> >> You can see these definitions when you hover with the mouse over the >> function: >> >> <PastedGraphic-1.png> >> >> or press Ctrl-space inside the curly brackets: >> >> <PastedGraphic-2.png> >> >> >> Also note that 8.0 has just come out where the support for remote data >> graphs has been promoted from beta to production quality. >> >> Holger >> >> >>> On 9 May 2024, at 12:15 AM, Marie Valadez <mevalade...@gmail.com >>> <mailto:mevalade...@gmail.com>> wrote: >>> >>> Hello! >>> >>> I found some documentation about tbs:loadRemoteResource which can be used >>> to programmatically load the remote resource which is similar to pushing >>> the button in UI to reload >>> (https://archive.topquadrant.com/doc/7.8/user_guide/remote/index.html?highlight=loadremoteresource). >>> However, I can't seem to find an example of how to call this in a dash:js >>> script. I would like to reload certain assets so that they can be found >>> when doing a SPARQL query. We have a data graph setup as the remote asset >>> (graph 1) which is imported by another data graph in EDG (graph 2). It is >>> from graph 2 that I would like to reload the remote asset and be able to >>> retrieve it in SPARQL queries. I tried calling >>> tbs.loadRemoteResources(false, true, 600, 1000000, 10, false, null, true, >>> null, ['http://example.com/CON_123456']) from the script editor to test it >>> out but no luck. >>> I tried different variations of the last argument such as >>> http://example.com/CON_123456 and <http://example.com/CON_123456> with and >>> without enclosing in brackets. I do see it says experimental so maybe it >>> isn't fully implemented yet? >>> >>> Was thinking maybe I need to call the remote graph first somehow but not >>> entirely sure. Would appreciate the help! >>> >>> Thanks! >>> >>> -- >>> 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 >>> <mailto: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/2b1693d1-96e1-4f76-aad1-06b95888006fn%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/topbraid-users/2b1693d1-96e1-4f76-aad1-06b95888006fn%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 >> <mailto:topbraid-users@googlegroups.com> >> --- >> You received this message because you are subscribed to a topic in the >> Google Groups "TopBraid Suite Users" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/topbraid-users/BiNugp_Ygr4/unsubscribe. >> To unsubscribe from this group and all its topics, 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/CFC575C1-E461-4753-AB81-4F58617070D3%40topquadrant.com >> >> <https://groups.google.com/d/msgid/topbraid-users/CFC575C1-E461-4753-AB81-4F58617070D3%40topquadrant.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 > <mailto: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/CAH4XeR9BEC-Y2mcPgKASm%2BvwBer1eaf%2BOD1chNEbv_RejzWf1A%40mail.gmail.com > > <https://groups.google.com/d/msgid/topbraid-users/CAH4XeR9BEC-Y2mcPgKASm%2BvwBer1eaf%2BOD1chNEbv_RejzWf1A%40mail.gmail.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/8553288C-1BF5-4AE6-BC41-96FBB34CE27E%40topquadrant.com.