Navigation

    APPDRAG Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular

    REMINDER

    Please be respectful of all AppDragers! Keep it really civil so that we can make the AppDrag community of builders as embracing, positive and inspiring as possible.

    SOLVED Link SQL dropdown with other table?

    Cloud Backend (Cloud DB, API Builder)
    2
    6
    476
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      Thomas D last edited by Thomas D

      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?

      Joseph Benguira 1 Reply Last reply Reply Quote 0
      • Joseph Benguira
        Joseph Benguira @Thomas D last edited by

        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

        T 1 Reply Last reply Reply Quote 1
        • T
          Thomas D @Joseph Benguira last edited by

          @joseph-benguira

          Thank you, I'll try that.

          Do you have any tips on how to split sql results into multiple pages?

          Joseph Benguira 1 Reply Last reply Reply Quote 0
          • Joseph Benguira
            Joseph Benguira @Thomas D last edited by

            @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/

            T 1 Reply Last reply Reply Quote 0
            • T
              Thomas D @Joseph Benguira last edited by

              @joseph-benguira

              Thanks, I was using the visual select and was hoping this was implemented. Is it in the documentation? I couldn't find anything.

              Joseph Benguira 1 Reply Last reply Reply Quote 0
              • Joseph Benguira
                Joseph Benguira @Thomas D last edited by

                @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)

                1 Reply Last reply Reply Quote 1
                • First post
                  Last post