<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Allowing limited number values displaying in Drop down?</title><link>https://community.appian.com/discussions/f/user-interface/13599/allowing-limited-number-values-displaying-in-drop-down</link><description>Hello, 
 
 
 How Can I display the limited number of values in the Dropdown Component? 
 
 
 Thanks in Advance</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Allowing limited number values displaying in Drop down?</title><link>https://community.appian.com/thread/61761?ContentTypeID=1</link><pubDate>Sun, 21 Oct 2018 23:50:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:108456f6-d372-409d-84dd-3191ced8baf5</guid><dc:creator>sandeepn</dc:creator><description>Thanks,Alok&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Allowing limited number values displaying in Drop down?</title><link>https://community.appian.com/thread/61759?ContentTypeID=1</link><pubDate>Sun, 21 Oct 2018 22:49:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:47d96a16-ce9b-460f-895f-41320dd3d2cb</guid><dc:creator>aloks0189</dc:creator><description>&lt;p&gt;Hi @sandeepn ,&lt;/p&gt;
&lt;p&gt;To achieve this you can follow below mentioned steps.&lt;/p&gt;
&lt;p&gt;1. Define a variable on load() of this interface&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;local!paging_pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: 10,
    sort: a!sortInfo(
      field: &amp;quot;Your Primary Key/ or any other column&amp;quot;,
      ascending: true()
    )
  )&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;2. Now call the Query Entity Rule by passing this local variable as an input for PagingInfo. this means initially Query Entity will pull 10 rows only. And store the query result into a local Variable, say local!datasubset.&lt;/p&gt;
&lt;p&gt;3. Define and configure the dropdown.&lt;/p&gt;
&lt;p&gt;4. Define a Link Field with a Dynamic Link (say, &lt;strong&gt;Show All&lt;/strong&gt;) below/beside your dropdown depending on your requirement and configure it as follows.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!linkField(
        links: a!dynamicLink(
        label: &amp;quot;Show More&amp;quot;,
          saveInto: {
            a!save(
              local!paging_pagingInfo, /* Variable declared on load */
              a!pagingInfo(
                startIndex: 1,
                batchSize: - 1,
                /*Querying all the rows*/
                sort: a!sortInfo(
                  field: &amp;quot;Your Primary Key/ or any other column&amp;quot;,
                  ascending: true()
                )
              )
            ),
            /*Assuming yourQueryEntity is the name of your rule to Query the data.*/
            a!save(
              local!datasubset,
              rule!yourQueryEntity(pagingInfo: local!paging_pagingInfo)
            )
          }
        )
      )&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Hope this will help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Allowing limited number values displaying in Drop down?</title><link>https://community.appian.com/thread/61745?ContentTypeID=1</link><pubDate>Fri, 19 Oct 2018 19:29:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:dd0cf0c0-6b9c-4dfd-95fe-d5bb1dd6ae34</guid><dc:creator>sandeepn</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt; &lt;br /&gt; Thanks for the reply everyone,&lt;br /&gt; My exact question is In the database table there are 50 rows of data. Initially, in the dropdown, I need to display 10 rows and below the dropdown, I need to give one link i.e &amp;quot;showall&amp;quot;, If user Clicks that showall link I need to display all the rows(50) in the drop-down.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Allowing limited number values displaying in Drop down?</title><link>https://community.appian.com/thread/61727?ContentTypeID=1</link><pubDate>Fri, 19 Oct 2018 16:03:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:67d4a8b1-29b0-4d60-bc1b-2911d83a9246</guid><dc:creator>philips397</dc:creator><description>All of these will work, and I agree that you will want to double check that your solution does not break any existing instances as this can be a common pitfall.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Allowing limited number values displaying in Drop down?</title><link>https://community.appian.com/thread/61705?ContentTypeID=1</link><pubDate>Fri, 19 Oct 2018 05:23:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8ab91055-c2c6-4ce3-acd2-b83499ccd1ec</guid><dc:creator>chandu</dc:creator><description>All the above ways are good please be remember while limiting the drop down values , Existing instances should not break throwing pink screen error message that the value supplied is not in the choice values list.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Allowing limited number values displaying in Drop down?</title><link>https://community.appian.com/thread/61703?ContentTypeID=1</link><pubDate>Fri, 19 Oct 2018 03:50:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9de23119-cf03-4826-ade9-ecce524692ac</guid><dc:creator>ekanshj</dc:creator><description>&lt;p&gt;Hi Sandeep,&lt;br /&gt;You can do this in multiple ways.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Adding a filter condition if the values are from DB.&lt;/li&gt;
&lt;li&gt;Using remove function to remove the indexes not required. for ex:&lt;br /&gt;load(&lt;br /&gt; local!data: {1,2,3,4,5,6,7,8,9,10},&lt;br /&gt; local!indexToRemove: {1,5},&lt;br /&gt; local!drop,&lt;br /&gt; a!dropdownField(&lt;br /&gt; label: &amp;quot;Test&amp;quot;,&lt;br /&gt; choiceLabels: remove(local!data,local!indexToRemove), &lt;br /&gt; choiceValues: remove(local!data,local!indexToRemove), &lt;br /&gt; placeholderLabel: &amp;quot;Please Select&amp;quot;,&lt;br /&gt; value: local!drop,&lt;br /&gt; saveInto: local!drop&lt;br /&gt; )&lt;br /&gt;)&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Allowing limited number values displaying in Drop down?</title><link>https://community.appian.com/thread/61702?ContentTypeID=1</link><pubDate>Fri, 19 Oct 2018 03:37:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2cec2fa1-0c33-4096-8f63-0ec638e7e19e</guid><dc:creator>ganeshp</dc:creator><description>Hi,&lt;br /&gt;
Another option would be to have an active and inactive indicator which can be used to limit dropdown options and query entity can be modified to show or retreive the same&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Allowing limited number values displaying in Drop down?</title><link>https://community.appian.com/thread/61700?ContentTypeID=1</link><pubDate>Fri, 19 Oct 2018 03:14:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8799e169-87da-4b36-8ef9-ea11c558a050</guid><dc:creator>aloks0189</dc:creator><description>&lt;p&gt;Hi @&lt;a class="internal-link view-user-profile" href="/members/sandeepn"&gt;sandeepn&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There are various options to display limited number of choice options to display in a drop-down component,&amp;nbsp;for example:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Let&amp;#39;s assume you are pulling few rows from your reference table to display it under the drop-down component. And assume you have more than 10 rows available in DB but you just want to limit the set of options to 10 then, you can make the use of pagingInfo while querying the data, as mention below:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;rule!yourQueryEntity(
    pagingInfo: a!pagingInfo(
        startIndex: 1, 
        batchSize: 10, 
        sort: a!sortInfo(
            field: &amp;quot;your Field Name/Primary Key Column&amp;quot;,
            ascending: true()
        )
     )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In this case irrespective of how many rows you have in your DB, Query Entity will only pull 10 rows sorted by the provided column and will display the same under dropdown component.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But, out of interest, why do you want to show only few options under a drop-down, is that based on some conditions?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>