Allowing limited number values displaying in Drop down?

Certified Senior Developer

Hello,

 

 

 How Can I display the limited number of values in the Dropdown Component?

 

 

Thanks in Advance

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Hi @ 

    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?

  • 0
    Certified Senior Developer
    in reply to aloks0189
    Hi,
    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
Reply Children
No Data