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

Weirdness with filter. #15

Open
RobertPHeller opened this issue Apr 16, 2022 · 2 comments
Open

Weirdness with filter. #15

RobertPHeller opened this issue Apr 16, 2022 · 2 comments

Comments

@RobertPHeller
Copy link

I am getting weird results with the filter parameter:

sauron% curl -L "https://script.google.com/macros/s/AKfycbwz3mAVQlt4OGxorkKPiyx0PCaQSY0T0RJ1YItca60RGBlt5yHw45XeLn8sHu9DpCymRQ/exec?url=/api/officials&limit=0&apiKey=d08Low0RV7yL&filter=lower(office)+contains+'selectboard'"
[]sauron% curl -L "https://script.google.com/macros/s/AKfycbwz3mAVQlt4OGxorkKPiyPCaQSY0T0RJ1YItca60RGBlt5yHw45XeLn8sHu9DpCymRQ/exec?url=/api/officials&limit=0&apiKey=d08Low0RV7yL&filter=lower(office)+contains+'selec'"
[{"office":"Selectboard","name":"Laurie DiDonato","term":"2024","electedp":true,"index":29},{"office":"Selectboard","name":"Gillian Budine","term":"2022","electedp":true,"index":30},{"office":"Selectboard","name":"Dan Keller","term":"2023","electedp":true,"index":31},{"office":"Selectboard Clerk","name":"Joy Gorzocoski","term":"2020","electedp":false,"index":168},{"office":"Selectboard Clerk","name":"Liam DiDonato","term":"2020","electedp":false,"index":169}]
sauron% curl -L "https://script.google.com/macros/s/AKfycbwz3mAVQlt4OGxorkKPiyPCaQSY0T0RJ1YItca60RGBlt5yHw45XeLn8sHu9DpCymRQ/exec?url=/api/officials&limit=0&apiKey=d08Low0RV7yL&filter=lower(office)+contains+'selec'"
[{"office":"Selectboard","name":"Laurie DiDonato","term":"2024","electedp":true,"index":29},{"office":"Selectboard","name":"Gillian Budine","term":"2022","electedp":true,"index":30},{"office":"Selectboard","name":"Dan Keller","term":"2023","electedp":true,"index":31},{"office":"Selectboard Clerk","name":"Joy Gorzocoski","term":"2020","electedp":false,"index":168},{"office":"Selectboard Clerk","name":"Liam DiDonato","term":"2020","electedp":false,"index":169}]

sauron% curl -L "PCaQSY0T0RJ1YItca60RGBlt5yHw45XeLn8sHu9DpCymRQ/exec?url=/api/officials&limit=0&apiKey=d08Low0RV7yL&filter=lower(office)+contains+'select'"
[]

I want to select all Selectboard members, but it looks like lower('Selectboard') contains 'selec', but that lower('Selectboard') does NOT contain 'select'. Huh? What is going on here?

@siquylee
Copy link

I think you did not encode the condition correctly. It does not support function in query condition so you should try Selectboard contains 'select' instead of lower('Selectboard') contains 'selec',

@RobertPHeller
Copy link
Author

RobertPHeller commented Apr 18, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants