for each recA in Collection_Tracking
{
recCount = 0;
for each recB in Collection_Items
{
recCount = (recCount + 1);
}
}
\\
\\
\\UsedList is a List variable updated with a Multi-Line field called UsedItem.
UsedList = List();
UsedList = input.UsedItem.toList();
alert "UsedList is " + UsedList; \\this is for testing purposes\\
if ((input.Customer_Name != "") && (input.Customer_Name != "-Select-"))
{
clear row.Item;
if (recCount = 1)
{
\\for the first record, the picklist takes the full list
List = Items [Customer_Name == input.Customer_Name];
row.Item:ui.append(List.Item_Name.getall());
}
else
{
\\for the rest of the records, the items selected before (saved in UsedList) are meant to be removed from the list
List = Items [(Customer_Name == input.Customer_Name && (Item_Name not in UsedList))];
row.Item:ui.append(List.Item_Name.getall());
}
disable Customer_Name;
row.Collection_ID = input.Collection_ID;
}
else
{
reload;
alert("Enter Customer Name First!");
}
on user input
{
WorkingList = List();
WorkingList = input.UsedItem.toList();
temp = "\"" + row.Item + "\"";
WorkingList.add(temp.toString());
alert("workingList after adding the current item is " + WorkingList);
input.UsedItem = WorkingList.toString();
alert(input.UsedItem);
}
Please help. I'm stuck for hours and hours on this.