Searches of a list

Kelly Burgess kellyb at montana.com
Tue Jan 3 06:30:17 UTC 2023


Das wrote:
> From Kelly I received the thing that really made it work, that is, how to square bracket the search.
> 
> Instead of 
> 
> myList.$search([mySearchString])
> 
> Use instead
> 
> Calculate myString as con('$Search.',mySearchString)
> Do myList.[myString]
> 
> It’s just a twist on how you do the square bracket, but it WORKED and that’s what matters. 

That was slightly misquoted.  The Calculate myString con() is wrong.  It should be:

  Calculate myString as con('$search(',mySearchString,')')

The point is to wrap the search string with $search().  It's the same 'trick' that I use to define a list with a user-selected set of columns.  I found that

  Do list.$define([colString])

does not work, but the same approach of wrapping the columns string with $define() does work.

  Calculate define as con('$define(',colString,')')
  Do list.[define]

It's just something about the way the Omnis parser works.

Kelly


More information about the omnisdev-en mailing list