I need a filtering picklist for thousands of items, I need to make a smaller pick list, currently getting too many items. I think the secret will be to use a Key Field, but I cannot figure out how to make it work for me. Each item has a unique non-intelligent part number.

I would like to get a expanding droplist, something like this, allowing me to pick the part number in the last column:

This allows the same part to be chosen from multiple Key values
I created a complete list of all items by using @XLookupSourceListAll that shows a descending list by Category showing Item No and Description.
If @ISBLANK(Item) then {
// Get the list of all the Category Types and Items
// (The KEY field must be the first field in the results list)
vValList = @XLookupSourceListAll(@FN, "..", "INVENTORY!Category", "Category;ItemNo;Description")
// Replace the semicolons with slashes to create the submenus
vValList = @Replace(vValList, ";", "/")
// Replace the line breaks with semicolons so the
// whole thing can be passed to @PopupMenu.
vValList = @Replace(vValList, @NewLine(), ";")
// Sort the semicolon separated list
vValList = @SortStringArray(vValList, 0)
// Show the list as a picklist
// ElementName cannot be a variable
PopupSelectPosition(4, @Xpos(cmdAddLineItem), @Ypos(cmdAddLineItem))
vChoice = @PopupMenu(vValList, "Choose A Category, then an Inventory Item")
This works OK but is too long. Can this be modified to handle Key Field values, maybe need to run multiple times? How do I add the needed submenu "/"s? Or is there another, better way to make the list?.
1. So, I want a similar list but instead of filtered just by Category, I want multiple sorts by about three fields, including one or two Key Value fields.
2. Since this might take some processing time, how can this picklist be created as a Global Static value in GLOBAL code on the PickList Form so it only runs once?
3. Can the Global Static value in a PickList Form be automatically updated by putting code in the Inventory form that updates when certain values are added/modified/deleted?