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

Lookup columns used in filters and formulas cause errors #1866

Closed
RawmanGrey opened this issue Apr 25, 2022 · 3 comments
Closed

Lookup columns used in filters and formulas cause errors #1866

RawmanGrey opened this issue Apr 25, 2022 · 3 comments

Comments

@RawmanGrey
Copy link

Lookup columns referencing parent's field return errors if used in filters or formulas. Issue is not related to data type (tested with strings and numbers). Lookups from parent entry work as expected.

Error message from example below complains on missing '__nc0.nc_0ysj__types_id' and named alike columns.

.gif example

Peek 2022-04-21 15-17

Known since v0.90.5.

pranavxc added a commit that referenced this issue Apr 25, 2022
re #1866

Signed-off-by: Pranav C <pranavxc@gmail.com>
@pranavxc
Copy link
Member

Can you share error details with the formula? Also, you can include the steps to reproduce the issue which will be helpful for us.

@RawmanGrey
Copy link
Author

Can you share error details with the formula? Also, you can include the steps to reproduce the issue which will be helpful for us.

If it's still relevant:

  1. Create new project
  2. Create table 'parents' and make new row there - 'Foo Parent'
  3. Create table 'children' and make new row there - 'Bar Child'
  4. Switch to 'parents' and create column with a type of 'LinkToAnotherRecord', choose 'Has Many' type 5. related to 'children' table. Link the only record in just created column.
  5. Switch to 'children' and create column named 'lookup_child_name' with a type of 'Lookup'. Choose 'parents' as a child table and pick 'Title' child column. (bug can be reproduced with any other column as well)

Now you can see 'lookup_child_name' column's content as expected, so as get it's content in REST API call. But referencing it in flowing cases cause errors:

  • Set filter in 'children' table where 'lookup_child_name' ...anything, check network requests in browser console and see requet with 400 code.

  • Create 'formula' column in 'children' table. To keep it simple just reference lookup_child_name in formula column. It will show output as expected - 'Foo Parent'. Now, create filter based on 'formula' column. It will work as expected if using 'is equal' and 'is not null', but filtering 'is not empty' will return response with code 400 and message complaining on some empty id in quotes. Filtering by 'is like' return responses with code 200, but not returning expected results.

'is like' problem .gif illustration

Peek 2022-04-26 10-04

It's worth to notion, that before version 0.90, GET requests containing filters had filters parameters shown in urls, but now they end up with empty '&where=', may be it is related?

urls with empty 'where' at screenshoots

Screenshot_20220426_090839
Screenshot_20220426_090743

PS:
I'm sorry, my postgres returns errors localized, so I'm loosely translating those.

@github-actions
Copy link
Contributor

Fixed in v0.90.8.

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

3 participants