REMINDER
SOLVED Link SQL dropdown with other table?
-
Is there a built in SQL Feature for this or do we need to use an API function?
Example:
- I have 1 table with items, 1 column have name.
- Another table have multi-dropdown ["name1","name2"]
It would be convenient if we could populate the multi-dropdown with values from the other table (Value picker), is that possible?
-
Hey @thomasd, if you are talking about the Database Editor, yes you can configure your field to be a "Linked Fields by values" on and point to the other table / col, you will then have a tag input where you can select one or multiples values from the other table in your field
-
Thank you, I'll try that.
Do you have any tips on how to split sql results into multiple pages?
-
@thomasd if it's a Visual Select function you can use AD_PageNbr & AD_PageSize parameters to control how many rows are returned per page and what is the current page number
var settings = { "url": "https://xxxxxxxxxx.appdrag.site/api/test", "data": { "AD_PageNbr" : "1", "AD_PageSize" : "500" }, "method": "POST", "async": true, "crossDomain": true, "processData": true }; $.ajax(settings).done(function (response) { console.log(response); // TODO: Do something with the result });
if you use other kind of cloud functions you have to implement the offset yourself
https://www.sqlshack.com/learn-mysql-what-is-pagination/ -
Thanks, I was using the visual select and was hoping this was implemented. Is it in the documentation? I couldn't find anything.
-
@thomasd it's displayed in the auto generated API function documentation (when you are editing a cloud function, click on Documentation on the right side)