Zoho Deluge - Store and repopulate a multi lookup list in Creator

A quick reminder on how I got a working snippet of code to store the entries in the lookup already selected, check against another table/form for valid options, repopulate the list with the selected item and filtering the options available for selection.

This was for a multi lookup with staff as the list entries. The lookup needed to filter against various forms such as Staff Rotas, Leave Requests, Qualifications and some others.

The aim/objective is the following:
  1. Store what was already selected in the lookups
  2. Clear the lookups list
  3. Restore what was originally selected as selected.
  4. Repopulate with a filter list of options (not selected but available)
// *************************************************************
// store already selected entries
    // remember remember the 5th of november
    l_RememberLookup = List();
        for each  v_SelectedLookup in input.myLookup
// clear lookup
clear myLookup;
// get list of all valid entries 
l_AllowedEntries = {};
for each  v_AllowedID in myForm[ID != 0]
    v_thisID = v_AllowedID.ID;
// restore item in lookup
input.myLookup = l_RememberLookup;
// repopulate lookup options (not selected items)
for each  r_EntryID in l_AllowedEntries

Additional Note(s):
  • If removing elements, even if you are using Creator v5, use removeElement() and NOT remove() which got me stuck for a while. This is for error
    ...datatype {0} is not the same as list datatype {1}...

Related Articles

Joes Revolver Map


Badge - Certified Zoho Creator Associate
Badge - Certified Zoho Creator Associate

Donate & Support

If you like my content, and would like to support this sharing site, feel free to donate using a method below:

Donate to Joel Lipman via PayPal

Donate to Joel Lipman with Bitcoin - Valid till 8 May 2022 3QnhmaBX7LQSRsC9hh6Je9rGQKEGNQNfPb
© 2021 Joel Lipman .com. All Rights Reserved.