On 19/10/2020 9:34 pm, sjoerd...@gmail.com wrote:

Hi Holger,
It is indeed a subclass of teamwork:ProjectTabs, the ?projectGraph variable works perfectly. Is there perhaps a similair easy way of using this value (e.g. urn:x-evn-master:someGraph) in a sparql motion script called from the ui:prototype?

I guess you need to pass this value of ?projectGraph into the SM script as an argument of your choice. How do you invoke the SM script from the prototype? Is it a (SPIN) function with spl:Argument constraints?

Holger



Regards,
Sjoerd

Op zaterdag 17 oktober 2020 om 03:19:34 UTC+2 schreef Holger Knublauch:

    Hi Sjoerd,

    the currently active query graph in SWP can be queried using the
    SPARQL function ui:currentQueryGraph().

    In your example, shouldn't the Tab be a subclass of
    teamwork:ProjectTabs instead? In that case, you can access the
    current project graph using the variable ?projectGraph (like
    urn:x-evn-master:XY) in the ui:prototype.

    Holger


    On 10/16/2020 10:51 PM, sjoerd...@gmail.com wrote:

    Hi all,

    I've build a small SWP page which shows in EDG as an additional
    tab of asset collections (a subclass of teamwork:Tabs containing
    a ui:prototype).

    From this page I'm able to call different Sparql Motion scripts
    which manipulate the asset I have open at that moment. However,
    I'd prefer not to hardcode in my SWP or in my Sparql motion the
    graph to update. Ideally I'd like the SWP to 'know' which graph I
    on at that moment and parse this to the Sparql motion script.
    This would allow me to reuse a script for different datagraphs
    and use the current graph as a variable in SPARQL statements.

    I thought I could grab the projectGraph attribute from the URL in
    EDG which has the current datagraph as its value. This works
    using JavaScript, but I can't figure it out using SWP, nor can I
    parse my JS variable into my SWP.

    Is there a way to either use a JS function in my SWP prototype,
    or is there a SWP function which allows me to get the currently
    open graph?

    Regards,
    Sjoerd

-- 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/217f25d1-0b84-4903-b292-9560d470c984n%40googlegroups.com
    
<https://groups.google.com/d/msgid/topbraid-users/217f25d1-0b84-4903-b292-9560d470c984n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
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/e03d7d12-ef75-4e39-bf09-05708fa6976an%40googlegroups.com <https://groups.google.com/d/msgid/topbraid-users/e03d7d12-ef75-4e39-bf09-05708fa6976an%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
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/11c377a2-efac-4d6e-d99a-b5c0c09477ca%40topquadrant.com.

Reply via email to