Hi Kasia,

I’m not 100% sure, but I think the two variables need to be different in 
clauses like

    BIND(URI($provideUri) as ?provideUri )

Both are called “provideUri” here, and I think that is why the clause has no 
effect.

Richard



> On 7 Jul 2023, at 09:04, Kasia Kryczka <[email protected]> wrote:
> 
> Hi all,
> 
> I want to create a query where the user will provide the uri in the insert 
> part.
> So the user uses a query from sparql library and provides URI in the 
> parameter.
> 
> CONSTRUCT{
> ?provideUri ?p ?result
>   }
> Select *
> WHERE {
>   SELECT ?cS (GROUP_CONCAT(?pTY; SEPARATOR=', ') AS ?result) ?provideUri{
>   BIND(URI($provideUri) as ?provideUri )
>   BIND($PPTFilter as ?PPTFilter)
>   BIND($cFilter as ?cFilter )
>   BIND(teamwork:currentMasterGraph() as ?cGraph)
>  
> GRAPH ?cGraph 
>   {?cGraph owl:imports ?import}
>  
>   GRAPH ?import{
>         ?d a skos:cS.
>         ?d skos:hasTopConcept ?cS.
>         ?PPT skos:broader ?cS.
>         ?PPT ontology:PPT ?pTY .
>           }
> 
>  FILTER(CONTAINS(STR(?PPT), ?PPTFilter) ||
>       (CONTAINS(STR(?cS), ?cFilter))  )
>     
>   .
>     
>   }GROUP BY ?cS ?provideUri }
> 
>   BIND($PPTFilter as ?PPTFilter)
>   BIND($cFilter as ?cFilter ) these 2 are used as string and they work fine 
> 
> but I have a problem with the ?provideUri 
> 
>  I don't know what type to use should it be string?
> when I BIND manually <http:// > it works but when I try to do it by the 
> parameter inserted is shows nothing.
> 
> Is it possible to have a solution when the user insert the URI?
> 
> 
> 
> Parameters:
> provideUri:
> Optional
> booleandatedateTimedecimalintegerstringlangStringasset of type...
> 
> 
> 
> Parameters for SPARQL library query "test2"
> ×
> Please fill in the values for the query parameters.
> 
> provideUri2
> 
> 
> Br,
> 
> Kasia
> 
> 
> -- 
> 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] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/d6b7b790-7df7-4c07-b5d0-f0a1ed22f4adn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/d6b7b790-7df7-4c07-b5d0-f0a1ed22f4adn%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 [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/A9761608-210D-4E1C-A1F4-5BE9E75DCBBC%40topquadrant.com.

Reply via email to