For Zoho services only


I'm currently part of a wider delivery team at Ascent Business Solutions, recognised as a leading Zoho Premium Solutions Partner in the United Kingdom.

Ascent Business Solutions support organisations with everything from targeted technical fixes through to full Zoho CRM implementations and long-term platform adoption. Working as a team rather than a one-person consultancy allows projects to move forward consistently, with access to the right skills at each stage.

The team I manage specialises in API integrations between Zoho and third-party finance and commerce platforms such as Xero, Shopify, WooCommerce, and eBay. Much of our work involves solving integration challenges that fall outside standard documentation, supporting new ideas, new sectors, and evolving business models.

Success is measured through practical outcomes and return on investment, ranging from scaling small operations into high-turnover businesses to delivering rapid gains through online payments, automation, and streamlined digital workflows.

If you are looking for structured Zoho expertise backed by an established consultancy, you can contact Ascent Business Solutions on 0121 392 8140 (UK), email info@ascentbusiness.co.uk, or visit https://www.ascentbusiness.co.uk.

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

What?
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.

Why?
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.

How?
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)
copyraw
// *************************************************************
// store already selected entries
//
if(!isnull(input.myLookup))
{
    // remember remember the 5th of november
    l_RememberLookup = List();
    if(input.myLookup.size()>0)
    {
        for each  v_SelectedLookup in input.myLookup
        {
            l_RememberLookup.add(v_SelectedLookup);
        }
    }
}
//
// 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;
    l_AllowedEntries.add(v_thisID);
}
//
// restore item in lookup
input.myLookup = l_RememberLookup;
//
// repopulate lookup options (not selected items)
for each  r_EntryID in l_AllowedEntries
{
    input.myLookup:ui.add(r_EntryID);
}
  1.  // ************************************************************* 
  2.  // store already selected entries 
  3.  // 
  4.  if(!isnull(input.myLookup)) 
  5.  { 
  6.      // remember remember the 5th of november 
  7.      l_RememberLookup = List()
  8.      if(input.myLookup.size()>0) 
  9.      { 
  10.          for each  v_SelectedLookup in input.myLookup 
  11.          { 
  12.              l_RememberLookup.add(v_SelectedLookup)
  13.          } 
  14.      } 
  15.  } 
  16.  // 
  17.  // clear lookup 
  18.  clear myLookup; 
  19.  // 
  20.  // get list of all valid entries 
  21.  l_AllowedEntries = {}
  22.  for each  v_AllowedID in myForm[ID != 0] 
  23.  { 
  24.      v_thisID = v_AllowedID.ID; 
  25.      l_AllowedEntries.add(v_thisID)
  26.  } 
  27.  // 
  28.  // restore item in lookup 
  29.  input.myLookup = l_RememberLookup; 
  30.  // 
  31.  // repopulate lookup options (not selected items) 
  32.  for each  r_EntryID in l_AllowedEntries 
  33.  { 
  34.      input.myLookup:ui.add(r_EntryID)
  35.  } 

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
    copyraw
    ...datatype {0} is not the same as list datatype {1}...
    1.  ...datatype {0} is not the same as list datatype {1}... 
Category: Zoho Deluge :: Article: 241

Credit where Credit is Due:


Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman
www.joellipman.com