-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[BUDI-7375] Relationship picker incorrectly renders selections, and not all records show in the dropdown #11478
Comments
But why does the limit cause the data to be rendered incorrectly? Surely that cannot be right? An application level filter would be no use here. A filter that can be applied by the user might work. A 100 row limit makes the relationship picker pretty useless in this case. Are there out of the box alternatives? |
Hey @kpturner I may have mis-understood the issue. Are you talking about the Relationship Picker component in the Design section, or is this issue about selecting relationships in the Data section? |
I'm talking about the relationship picker you'd add as a component to your application(s). That's the one that renders badly. The one that you get by default in the "data" section on a grid seems fine (in terms of what it renders). The issue I am seeing is on a picker that selects currency codes so naturally there will be a lot more than 100, and the one that looks wrong is USD (which will obviously be way down the list past 100) |
Thanks for the clarification @kpturner Is it possible for you to add a filter to the relationship picker? Something like: So in this case it is assuming you have selected a country already in a form, and are returning only the currencies that are available in that country. Would that ever be more than 100? Also if you cannot share the app export, you can share the SQL schema (only metadata about the tables are shared, i.e. column names and types): https://docs.budibase.com/docs/troubleshooting-sql |
The problem is with creating a new country - when you need to select its currencies from an unfiltered list. Admittedly we do not create new countries very often 😂 |
Even when editing a country you need to be able to select from the entire list of currencies. The only time I can think of a filter being useful is for display only - but then it's not really a "picker". |
I have emailed the schema dump to team@budibase.com |
@melohagan This seems to have gone quiet and it is becoming a bit of a showstopper. What happened with the schema dump I sent? |
Hey @kpturner Have you tried using an options picker with a data provider source instead? https://docs.budibase.com/docs/option-picker#using-a-data-provider |
It would have to be a multi-select picker to be useful - but then that does not like the data type for the field. |
The multi-select picker has the same ability to use a data provider as its source. You can also always manually enter a field name. |
Yes but to initialise it with existing values I would presumably need to convert the data for the "worker" field first. I will try it. What format does the data need to be in? I will try a comma delimited list. |
Of course this is a pretty horrific work around as the data comes from (and has to be updated to) a relationship table that just has the keys of the two files. It is not just a column in a table that can be sorted out on the save event. Nightmare to fix something that should work anyway. |
That bit is the easy bit. When editing an existing country I still have to: |
Shouldn't be too bad. For part a assuming you have the value column set to _id then you should be able to bind the relationship field to the default value of the multi-select without any transformations required. Part b, in your Save Row action you will |
I didn't follow that at all Assume I have a Would it be possible to document an example with based on the schema I sent? |
Had a look at this, and the Many-Many joining table definitely makes this more difficult. What's needed is the search functionality that can be found in the relationship picker of the data section. That way even if the options are limited to 100, the search could still be used to scan the whole table. |
I have is successfully loading the picker at least by setting the default value to |
Given that the relationship field raw value seems to be something like this: |
Having a look now at adding the search, and I do have it selecting an initial value by doing an initial search of the field value. Just working through a few other edge cases for the search as well |
Is there likely to be any new work on this? |
Hey @andyburgessmd Thanks for bringing our attention to this one, I can confirm it to be a regression: |
What's the status on this? With me there are only 20 records showing in the picker and a search only searches in those 20. In order to select the right value, I have to scroll down in the picker in order to load all the records in the picker, and only then I can search for the one I need. This is quite useless off course. |
Try version 2.21.2 |
Checklist
Hosting
Describe the bug
A relationship picker does not render selections properly, and does not provide all the available rows for selection
To Reproduce
Created a relationship between two simple tables -
country
andcurrency
. Acountry
can have multiplecurrency
records associated with it. The data is held in acountry_currency
table that just contains the primary key ofcountry
and the primary key ofcurrency
. The data is correctly rendered in the grid in the "data" section of the designer - for example:But within the application where a relationship picker is used,
USD
shows as%5B'USD'%5D
Furthermore when you use the picker to choose other currencies, only a handful of the total records appear in the dropdown.
Expected behavior
All selections should be rendered properly and all available records should appear in the relationship picker.
Screenshots
See above
App Export
I don't think I can, because the export would contain the secure credentials to the data source, and without the data source, there would be no data to test with. I am more concerned about what it is about the data that could cause this, as it looks completely normal in the DB and is handled correctly by the "data" section of the designer.
What I can do is simply send the entire postgres schema via email if need be. If it is data related that would help diagnosis.
Desktop (please complete the following information):
From SyncLinear.com | BUDI-7375
The text was updated successfully, but these errors were encountered: