I have a page built on which a user can call up a record from table ‘A’ in a back end in Xano, and edit fields of this record using inputs/dropdowns/multidropdowns which contain anything from a few to a few thousand choices. The shorter dropdown lists take their list of options from option sets. However for one set of 20 fields, the dropdown choices are called up from the table ‘B’ of several thousand records, through an API.
For each field I have set the default value to the value of the field in the Table ‘A’ record called up. However when it comes to the fields drawing from Table ‘B’ I have a challenge. The Type of Choices has to be set to the External API for calling Table B. When I try to then get the Default Value for those same fields direct from Table A (e.g. through a single API call to Table A getting all of the fields for the record being edited), I get a ‘red text’ error, as this is not consistent with the 'Type of Choices / Choices Source (the API that calls Table B).
To get around this I have developed a convoluted API workflow in Xano that Calls the API linked to Table B for each of these 20 fields, then within Xano Gets the record from Table A that is the ‘Default Value’, searches for the record in Table B that matches this and returns this record to the Bubble Front End. The problem is, this slows the API call to 4-5 seconds, and an API call needs to be made for each of the 20 fields of this type - making for a very long page load.
I feel like I’m missing a trick, and that there should be a more efficient way of loading the fields from a record in one table, and the choices from another, without so many API calls, but I keep running into this same ‘type consistency’ issue. One alternative is to set the element to a ‘raw text’ type, and then match the text to the correct table record in Xano and re-link it, but I suspect this will cause me data issues down the line so I’m not keen on this approach.
Any thoughts welcome.