If you're getting an error executing tbs.changes, you're probably calling from within a graph.withDataGraph block? It should work fine if you're calling it in the context of any asset collection as active graph.
Holger > On 16 Oct 2023, at 3:22 pm, Kasia Kryczka <[email protected]> wrote: > > Hi Holger, > > many thanks for quick reply :) > > I want for the the change history which will be later used for all > collections. > > with the first solution I got the following error : and I just > Error: Cannot execute SELECT query SELECT ?change ?comment ?time ?userId > ?addedCount ?deletedCount WHERE { ($about $maxTime $minTime $predicate > $requiredUserId $committedOnly $unlimited $originWorkflowId $returnCounts) > <http://topbraid.org/tbs#changes> (?change ?comment ?time ?userId ?addedCount > ?deletedCount) }: java.lang.IllegalStateException: No TCH graph can be > derived from the context > > Br, > > Kasia > On Monday, October 16, 2023 at 2:55:43 PM UTC+2 Holger Knublauch wrote: >> let months = 2; >> let maxTime = graph.eval(`NOW() - "P${months}M"^^xsd:duration`); >> let changes = tbs.changes(null, maxTime); >> changes; >> >> The above works for the change history only. If you need a general solution, >> you can use a corresponding SPARQL expression such as >> >> graph.eval('$value < $date', { >> value: ... the object ..., >> date: maxTime, >> }) >> >> HTH >> Holger >> >> >> >>> On 16 Oct 2023, at 2:20 pm, Kasia Kryczka <[email protected] <>> wrote: >>> >> >>> HI, >>> >>> How can I filter the object to get for example a date older than 2 months >>> from now ? >>> The triple looks as follows: >>> >>> object :05.07.2023 07:24 >>> >>> predicate : http://purl.org/dc/terms/created >>> >>> subject urn:x-change:2023-07-05T07-24-46.612example >>> >>> Thanks, >>> >>> 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] <>. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/topbraid-users/0e126aa8-174b-4d5e-ac78-8b8fae7aacbdn%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/topbraid-users/0e126aa8-174b-4d5e-ac78-8b8fae7aacbdn%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] > <mailto:[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/d8b7b95e-5b62-481f-a0b9-4a2f5cddfd66n%40googlegroups.com > > <https://groups.google.com/d/msgid/topbraid-users/d8b7b95e-5b62-481f-a0b9-4a2f5cddfd66n%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/57331D3F-5881-4E06-8DBE-3216DB9DFA94%40topquadrant.com.
