/
Prevent a select list from displaying certain options

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.

Code below will limit the # of selections a user can make to 3.

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 listenser Screen_Listeners/LimitNumberOfSelections.sil and is run when a change to customfield_10711 is detected This script will only allow a user to select 3 boxes in a checkbox list.

string [] c = argv["customfield_10711"]; if(arraySize(c) > 2) { c = deleteElementAt(c, 3); lfSet("customfield_10711" , c); }

Related content

Need support? Create a request with our support team.

Copyright © 2005 - 2025 Appfire | All rights reserved.