You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to improve the form generation using SHACL and DASH (ref:https://datashapes.org/forms.html).
In particular, I've tried to specify that the value must be of datatype "float" and not a literal. I have tried a couple of solutions based on the documentation. But every time I have an error when saving the record:
My first try:
Hi @PderyckeSciensano, for SHACL the correct syntax would be sh:datatype xsd:float (which could be combined with sh:nodeKind sh:Literal, but that's probably not required). This would at least solve the validation part. For the form itself, I'm not sure if there's a widget for floating point input; @janslifka can you confirm or deny this?
Hi Kees, Thx for your answer. I tried the solution you suggested and have the following error: "Unable to update entity data.".
Just to better understand the scope of my question. If I run a SPARQL query with " FILTER (?lat >= 40.75 && ?lat <= 40.85 && ?long >= -73.98 && ?long <= -73.88)" how do I query against floats and not strings?
You can recast datatypes in SPARQL. For example: xsd:float(?variable))
You need to have xsd in your PREFIX
Also, be aware that the recasting is LOCAL! Unless you assign the recast value to a new variable, you will need to do the recasting in every clause of the query!
I would like to improve the form generation using SHACL and DASH (ref:https://datashapes.org/forms.html).
In particular, I've tried to specify that the value must be of datatype "float" and not a literal. I have tried a couple of solutions based on the documentation. But every time I have an error when saving the record:
My first try:
Any idea of a correct and working syntax? Thx P.
The text was updated successfully, but these errors were encountered: