Hello,
How Can I display the limited number of values in the Dropdown Component?
Thanks in Advance
Discussion posts and replies are publicly visible
Hi @sandeepn
There are various options to display limited number of choice options to display in a drop-down component, for example:
Let'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:
rule!yourQueryEntity( pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 10, sort: a!sortInfo( field: "your Field Name/Primary Key Column", ascending: true() ) ) )
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.
But, out of interest, why do you want to show only few options under a drop-down, is that based on some conditions?