Skuid lets you display Reference fields (in edit mode) either as Autocompletes or Picklists. In Autocomplete mode, all records of the related object are searched, but in Picklist mode, a max of 200 options are available to select from. Is there a way to raise the limit on the number of options that are available, or to show all options?
This can be solved by using the rows in a Model as the source of your Picklist options, instead of the options being automatically provided by Skuid - in which case Skuid just chooses the first 200 records. For instance, say that you have a field called āBirth_Country__cā, which is a Lookup field to a custom āCountry__cā object, and you have created a record for all 268 ISO countries. Youāve added this field to your Skuid page, and you want users to be able to pick a Country from a list, rather than having them have to enter the country name. Hereās the best way to do this: 1. Create a āCountriesā Model in your Skuid page For Basic properties: -Model Id: Countries -SObject Type: Country__c Your Advanced Properties should look something like this: Notice two things here: (1) The āMax # of Recordsā has been left blank. This makes it so that all 268 Country records will be retrieved into the Model. (2) You can order these records however youād like! For instance, if you always want āUnited Statesā to show up first in your Countries list, you could add an additional āOrder__cā Number field on your Country object, and then order by that field first, and THEN by Name, by using āOrder__c NULLS LAST, Nameā as your āFields to Order Records Byā. Make sure to add the āNameā field, or whatever field on the Country object youād like to display to your users (e.g. Country_Long_Name__c), into your Countries Modelās Fields. 2. Edit the Advanced Properties of the Reference field in your Field Editor or Table component If you go in to your Field Editor or Table component which contains the āBirth_Country__cā field, and click on the fieldās āAdvancedā properties, by default what you will see is that āOption Sourceā is set to āAutomaticā. Hereās what to change: a. Set āOption Sourceā to āModelā b. Set āOption Modelā to āCountriesā c. Set āDisplay Templateā to ā{{Name}}ā, or whatever field on the Country__c object youād like to display to users, e.g. ā{{Country_Long_Name__c}}ā. 3. Click Save, then Preview! You should now see all Countries in your Birth Country Picklist! NOTE: When you use a Model as the Option Source, but have āDisplay Asā set to āAutocompleteā, only the rows in this Model will be used in the Autocomplete search. For example, if you are doing this, and you add a Condition to your Countries Model such that only North American countries are retrieved, then when you search for āAlgeriaā in the autocomplete box, nothing will be returned, even though there is a Country__c record whose Name is āAlgeriaā in your database ā because you have instructed Skuid to only search on records in your Countries Model.
Thanks Zach!
Zachā¦ great trick. I notice that the help for āmax number of recordsā does not mention that you can do thisā¦ that might help some people get itā¦
Sorry to reopen this but, If you donāt have the āadvanced propertiesā of the reference field, is located in āsearchā > āsearch Propertiesā