Prevent a select list from displaying certain options
Video shows how to restrict certain options from showing up. This is pretty simple and an actual use case would require some additional code to restrict certain options based on some logic.
The code below will limit the # of selections a user can make to three.
Watch Script
This scripts watches customfield_10711 and if a change is detected it runs the script Screen_Listeners/LimitNumberOfSelections.sil.
lfWatch("customfield_10711", {"customfield_10711", "key"}, "Screen_Listeners/LimitNumberOfSelections.sil", "change"); Hook Script
This script is called by a screen listener Screen_Listeners/LimitNumberOfSelections.sil and is run when a change to customfield_10711 is detected This script will only allow a user to select three boxes in a checkbox list.
string [] c = argv["customfield_10711"];
if(arraySize(c) > 2) {
c = deleteElementAt(c, 3);
lfSet("customfield_10711" , c);
}