Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display a range in Parameter select returns different data types and fails #774

Closed
KWLangendorf opened this issue Feb 2, 2024 · 2 comments · Fixed by #794
Closed

Display a range in Parameter select returns different data types and fails #774

KWLangendorf opened this issue Feb 2, 2024 · 2 comments · Fixed by #794
Labels
bug Something isn't working

Comments

@KWLangendorf
Copy link

  • NeoDash version: 2.4.2
  • Neo4j Database version: 5.15 (Community - Desktop).

I am trying to make a parameter select of integer values 0,5,10,...etc. to be written to a neodash_parameter ($neodah_wrap_limit)

using a custom query:
WITH range(0, 10 ,5) as limits UNWIND limits as limit with limit WHERE toString(limit) CONTAINS $input RETURN DISTINCT limit as value, limit as display ORDER BY limit ASC LIMIT 100

However it returns differing types 0=STRING, 5 and 10 are FLOATs.
If I make a table with the same type of query
WITH range(0, 10 ,5) as limits UNWIND limits as limit RETURN DISTINCT limit as value, apoc.meta.cypher.type(limit), limit as display ORDER BY limit ASC LIMIT 100
I get all values to INTEGER as expected.

I have attached the neodash report and a video.

kr Kirsten
neodash_test.json

neodash_test.mp4
@KWLangendorf KWLangendorf added the bug Something isn't working label Feb 2, 2024
@nielsdejong
Copy link
Collaborator

@BennuFire this is interesting. Looks like we might not be casting the type correctly?
0 becomes float, 5 becomes int and 10 becomes string? :)

@nielsdejong nielsdejong removed the 2.4.3 label Feb 21, 2024
@alfredorubin96 alfredorubin96 linked a pull request Feb 26, 2024 that will close this issue
@alfredorubin96
Copy link
Collaborator

Could you please test it now? The numbers are all float instead of being integers, but at least they share the same type instead of being either string or numbers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants