OMNIS7 syntax question
jmaus at theccgllc.com
Thu Jan 19 12:06:48 EST 2017
Picking up on this mid stream... Pick is one of the most powerful commands you have available. You can also nest picks in picks (my record is 23 picks in a pick that ran the logic to display a padlock icon in a grid in O7) along with other commands that return data to the pick that evaluates to true or false - or some other sequential value that then allows you to pick something else in your pick list. For example, completely contrived, and probably mixing Studio syntax in with this:
Just trying to give you an idea of what one might do with pick. It's like an "if then" where you can't "if then."
Note that in lists when you have these kinds of calculations in a column that either show different icons or change some attribute of the list, the calculation is only performed on the list lines that are initially visible. Scrolling will then cause the newly visible lines to then be calculated. Thus complex operations that might otherwise cause your list to seem to load slowly are actually only performed on the visible lines. Thus if you only have 10 rows visible out of 1000 lines your calculation will only be run on what you see making the performance of the list load much better than it would have been if it actually did the work on the lines not visible. I thought this was a cool feature as really, why do all that work when it can't be seen by the user?
> On Jan 19, 2017, at 1:07 AM, Kevin James <interqual2 at optusnet.com.au> wrote:
> Hi Mark
> The pick function is very useful.
> Often it is used with Boolean values I.e. false or true. For example #LSEL is either false (line is not selected) or true (line is selected )
> I find it easiest to always think of false as 0 and true as 1 so that you approach the pick function in the right way.
> Once you have this mindset then the pick function would look something like :
> pick(x,a,b,c,...,n) and the resulting value would be as follows:
> X= 0 ; a
> X= 1 ; b
> X= 2 ; c
> Manage your list subscriptions at http://lists.omnis-dev.com
More information about the omnisdev-en