<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Searchable list using Cloud Backend &#x2F; API Functions]]></title><description><![CDATA[<p dir="auto">I'm building a filter feature for my website where it filters images depending on what category the user selects from a dropdown,  checking checkboxes or inputting text. I created a database table and set up the right API functions to output my results. I binded my dynamic data source and added a Cloud Backend Inputs(Searchable List) and a gallery. I edit the gallery element and clicked on 'Data source Cloud Backend' checked 'enable' and selected 'Data source' from the dropdown.</p>
<p dir="auto"><img src="https://cf.appdrag.com/mj-art-test-1ea3b6/uploads/files/b77f3009-2e3c-4c63-9974-93599b5e52a1.png" alt="alt text" class="img-responsive img-markdown" /></p>
<p dir="auto"><img src="https://cf.appdrag.com/mj-art-test-1ea3b6/uploads/files/246e25ae-1f0e-41ca-9a4f-404bc5f285d8.png" alt="alt text" class="img-responsive img-markdown" /></p>
<p dir="auto">I dragged a jQuery source code block and pasted my API documentation jQuery code.</p>
<pre><code>&lt;div class="appdrag-gallery" format="rectangle" columns="4" spacing="10" caption-position="full-image" caption-alignment="center" caption-background="rgba(48,76,224,0.56)" border-size="0" border-radius="0" opacity="0.92" text-color="rgba(237,237,237,1)"
    font-family="Montserrat" font-size="30" market-id="3698545" owner-id="1" style="display:block"&gt;
    &lt;div class="appdrag-gallery-data" id="galleryData"&gt;
    &lt;/div&gt;
    &lt;div class="appdrag-gallery-view" id="galleryContainer"&gt;&lt;/div&gt;
    &lt;div class="clearfix"&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;script  appdrag-embed="true"&gt;
        //Wait for jquery to load before executing code
        addEventListener('JqueryLoaded', function(e) {

            // Pull the ID parameter from URL to place in API
            var url_string = window.location.href; // REFER TO IMAGE NOT PAGE?
            var url = new URL(url_string);
            var id = url.searchParams.get("id");

            // API call to fetch images from database
            var settings = {
                "url": "REPLACE_WITH_YOUR_API_URL", 
                "data": {
                    "id": id, 
                    "AD_PageNbr": "1",
                    "AD_PageSize": "500"
                },
                "method": "GET",
                "async": true,
                "crossDomain": true,
                "processData": true
            };
            $.ajax(settings).done(function(response) {

                // Check recieved Object
                var object = JSON.parse(response);
                if (object != null &amp;&amp; object.Table != null &amp;&amp; object.Table.length &gt; 0 &amp;&amp; object.Table[0].gallery != "") {
                    var images = JSON.parse(object.Table[0].gallery);
                    var pictureData = "";
                    var pictureView = "";

                    // Iterate through each image and create its own HTML block
                    $.each(images, function(idx, url) {
                        pictureData += '&lt;div class="appdrag-gallery-data-elem" caption="" gallery-image="' + url + '" order-id="0"&gt;&lt;/div&gt;';
                        pictureView += '&lt;div class="col-sm-3 col-xs-12" style="padding:10px"&gt;\
                                &lt;div class="appdrag-gallery-link" lightbox="' + url + '"&gt;\
                                    &lt;div class="appdrag-gallery-elem" caption="" gallery-image="' + url + '" order-id="0" style="border-style:none;border-width:0;border-radius:0;opacity:.92;border-color:#ccc"&gt;\
                                        &lt;div class="appdrag-gallery-image appdrag-gallery-image-rectangle" style="background-image:url(\'' + url + '\')"&gt;\
                                            &lt;div class="appdrag-gallery-caption au-center appdrag-gallery-caption-full-image" style="font-family:Montserrat;font-size:30px;background-color:rgba(48,76,224,.56);color:#ededed"&gt;\
                                                &lt;span style="display:inline-block;vertical-align:middle"&gt;&lt;/span&gt;\
                                            &lt;/div&gt;\
                                        &lt;/div&gt;\
                                    &lt;/div&gt;\
                                &lt;/div&gt;\
                            &lt;/div&gt;';
                    })

                    // Call the containers by their IDs and append the image blocks
                    $("#galleryData").append(pictureData);
                    $("#galleryContainer").append(pictureView);
                    resetLightbox(); //re-init lightbox for all generated images
                }
            });
        }, false);
    &lt;/script&gt;
</code></pre>
<p dir="auto">I followed this <a href="https://academy.appdrag.com/FullStack-with-cloud-backend-Episode-5.html" rel="nofollow ugc">tutorial</a> what I have mentioned above</p>
<p dir="auto">Here is where I got stuck.</p>
<p dir="auto">I know that I have to iterate through each image so it can populate the gallery once I make a selection from the searchable list(dropdown). How would I bind the searchable list, gallery and database properly? In the searchable list edit element would I click on 'Data source Cloud Backend' or would I click on 'Triggers -&gt;Cloud Backend' What is the different between these two options?</p>
<p dir="auto"><img src="https://cf.appdrag.com/mj-art-test-1ea3b6/uploads/files/13c710c5-76f3-4028-b29f-4c1487c660e5.png" alt="alt text" class="img-responsive img-markdown" /></p>
<p dir="auto">Also would the process look the same binding checkboxes and text inputs with the database</p>
<p dir="auto">Any screenshots, code snippets, or guidance would be appreciated.</p>
]]></description><link>https://community.appdrag.com/topic/937/searchable-list-using-cloud-backend-api-functions</link><generator>RSS for Node</generator><lastBuildDate>Mon, 17 Aug 2026 02:27:00 GMT</lastBuildDate><atom:link href="https://community.appdrag.com/topic/937.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 24 Aug 2021 16:15:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Searchable list using Cloud Backend &#x2F; API Functions on Wed, 25 Aug 2021 08:16:22 GMT]]></title><description><![CDATA[<p dir="auto">Hey <a class="plugin-mentions-user plugin-mentions-a" href="https://community.appdrag.com/uid/783">@Karol-W</a></p>
<ol>
<li>"Data source Cloud Backend" is to configure which datasources are loaded on the page (don't load too many or your page will be slow)<br />
"Triggers -&gt;Cloud Backend" is to configure an action that will call a cloud backend function</li>
</ol>
<p dir="auto">Dynamic datasources are useful to generate pages based on url parameters, they are useless for this kind of interaction you want to do here.<br />
So I would recommend you to remove that data source and replace it with a regular API call instead<br />
We have more tutorials about generating dynamic content without dynamic datasources here: <a href="https://support.appdrag.com/doc/Creating-Dynamic-content-using-Factory" rel="nofollow ugc">https://support.appdrag.com/doc/Creating-Dynamic-content-using-Factory</a><br />
<a href="https://support.appdrag.com/doc/Creating-Dynamic-content-using-Visual-Factory" rel="nofollow ugc">https://support.appdrag.com/doc/Creating-Dynamic-content-using-Visual-Factory</a></p>
<ol start="2">
<li>here you have a dropdown and you want to change the gallery content when the dropdown value is changed, so you should write some jquery code to capture the change on that SELECT dropdown</li>
</ol>
<pre><code>$( "SELECT[name='YourSelectNameHere']" ).change(function() {
  var newVal = $("SELECT[name='YourSelectNameHere']").val()
  //Call your function to load data from the api and display it
});
</code></pre>
]]></description><link>https://community.appdrag.com/post/3798</link><guid isPermaLink="true">https://community.appdrag.com/post/3798</guid><dc:creator><![CDATA[Joseph Benguira]]></dc:creator><pubDate>Wed, 25 Aug 2021 08:16:22 GMT</pubDate></item><item><title><![CDATA[Reply to Searchable list using Cloud Backend &#x2F; API Functions on Tue, 24 Aug 2021 16:24:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.appdrag.com/uid/783">@karol-w</a></p>
]]></description><link>https://community.appdrag.com/post/3796</link><guid isPermaLink="true">https://community.appdrag.com/post/3796</guid><dc:creator><![CDATA[Steve  Carrasco]]></dc:creator><pubDate>Tue, 24 Aug 2021 16:24:31 GMT</pubDate></item></channel></rss>