AnsweredAssumed Answered

Building an inverse list of items?

Question asked by disabled_JustinClose on Nov 15, 2012
Latest reply on Nov 16, 2012 by disabled_JustinClose

Title

Building an inverse list of items?

Post

     I am trying to find an efficient way of building an inverse list from a list of options from a checklist.  I have a user interface where they are checking off/on various things.  It is part of building a Find.  To prevent various fields from conflicting with each other, or having to build huge lists of possible combinations for a positive-Find, I decided to construct things using a negative-Find (i.e. Omit records that were NOT checked).

     I have currently been doing a three step process: 

     * collect the list of things that were Checked.  (Simple enough:  the checked items are in a global field.)

     * create a Master list of all possible values (not too difficult:  using ValueListItems(file; listname))

     * Then remove items from the Master that are in the Checked list.  This is where it seems to be getting trickier.  I am currently using a Substitute () command, replacing the Checked string with an empty string. 

     The substitute() is mostly working, but I tend to end up with a variety of gaps in my list at times, because of CRs being at the end of a string or not. 

     So, I was wondering if someone had a better way of building this Inverse array?  An SQL statement perhaps, where I can exclude a multi-value list?  Some better way of removing items from the multi-value list?

      

     Thanks,

     J

Outcomes