List Definition
Doug Easterbrook
doug at artsman.com
Wed Aug 1 09:13:56 EDT 2018
I know I’m wading into something you’ve thought (or fought) for a long time.. so, all I can do is ask questions..
I use (as in still use, even though we are totally postgres SQL) clear range of fields to get stuff out of the CRB — its very handy. sometimes its clear files - that works too.
but.. if I understand you are trying to have two methods to writ to the database, one for DML and the other for SQL.
is your situation like
give some fields in the CRB a value
save those into a temporary place
then somewhat along the way …
if DML
set main file [filename]
Prepare for edit
copy fields into CRB from temp place
update fields
Else (must be SQL)
make a sql statement to update files
end
and are you using table classes, or not?
Doug Easterbrook
Arts Management Systems Ltd.
mailto:doug at artsman.com
http://www.artsman.com
Phone (403) 650-1978
> On Aug 1, 2018, at 6:05 AM, Michael Mantkowski <michaelj at clientrax.com> wrote:
>
> Hi Doug,
>
> Yes, that is the correct intent.
>
> The reason this is coming up is because we are working on a module that will allow the standard DML commands to work with SQL. So, in this case the CRB is still in play. We are working with Omnis on this and it may be that "Clear range of fields" should not even be intercepted by this module and should just be left alone. But at this point is it is being intercepted so we are trying to replicate the correct behavior in the most efficient way.
>
> *********************************************************************
> Michael Mantkowski
> ClienTrax Software
> 1-614-875-2245
> *********************************************************************
>
>
> -----Original Message-----
> From: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com> On Behalf Of Doug Easterbrook
> Sent: Wednesday, August 1, 2018 8:40 AM
> To: OmnisDev List - English <omnisdev-en at lists.omnis-dev.com>
> Subject: Re: List Definition
>
> so, if I understand the problem
>
> you are using the following in a procedure
>
> begin reversible block
> clear range of fields a to b
> end reversible block
>
>
> to basically return all variables in the range of fields to their original value after messing around with them in the method??? is that the intent?
>
>
> in DML — clear range of fields works fast because its the current record bufffer you are playing with. it also works on had variables.
>
>
> in sql… you likely haven't loaded the data into the current record buffer, so the values are already in the line in the list — so you might be able to copy things to a row variable and return that to the list afterwards using $assign()
>
> or, copy the data into a temporary row and operate on that row.
>
> or.. use $loadcols to load the data from a list row into memory and then use the clear range of fields. the original line in the list should not be touched.
>
>
>
> its the end goal or purpose thats confusing .. I’m only hearing ’save variables.’ and that notion doesn’t really apply when things are in a list. meaning it sounds like you are refactoring your code at the moment to use SQL — and so you need to know that it doesn’t use the CRB which is primarily what the clear range of fields works on.
>
>
>
>
>
> Doug Easterbrook
> Arts Management Systems Ltd.
> mailto:doug at artsman.com
> http://www.artsman.com
> Phone (403) 650-1978
>
>> On Aug 1, 2018, at 5:18 AM, Michael Mantkowski <michaelj at clientrax.com> wrote:
>>
>> Hi Michael and Kelly,
>>
>> Thanks for those ideas. We have been down those roads already and
>> they work, but I am looking for a faster method.
>>
>> We are working on some SQL / DML compatibility things for the upcoming
>> Omnis 9. We are trying to find a fast way to replicate the "Clear
>> Range of Fields" command in Omnis. We have tried a few methods but so
>> far, they are far slower than the standard DML command. It is causing
>> a huge performance issue in out Medical Records module. In DML mode
>> it is taking approximately
>> .5 seconds to move from page to page. When we switch to SQL it was
>> taking 7
>> - 8 seconds which is totally unacceptable. Traced it down to heavy
>> use of Clear Range if fields in reversable blocks.
>>
>> We have improved it so that it is only taking about 3 seconds now but
>> that is still way off for what I am looking for. My idea was to
>> define the list to the range of fields I am looking for, save the
>> values in the list, add a second line to the list of all clear values
>> then do a load from list to clear the CRM values of only those fields
>> in the range. Then if it was in a reversable block we could just load
>> line 1 of the list again to bring back the original values.
>>
>> It also has to work with Hash Variables as well. That is why I was
>> looking to use square bracket redirection. I still think it might be
>> a bug that that does not work with lists. Can't see why it shouldn't anyway.
>>
>> Currently we are building a list of values by looking up the File
>> Class and searching them out and looping through as Michael suggested.
>> It just takes time.
>>
>> I could Implement this all manually in the locations I need it on my
>> medical record if I can't figure out a way to do what I am looking
>> for. But would rather have a snappy piece of reusable code that will
>> work for all current and future "Clear range of fields" needs.
>>
>> *********************************************************************
>> Michael Mantkowski
>> ClienTrax Software
>> 1-614-875-2245
>> *********************************************************************
>>
>>
>> -----Original Message-----
>> From: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com> On Behalf
>> Of Kelly Burgess
>> Sent: Tuesday, July 31, 2018 7:58 PM
>> To: OmnisList <omnisdev-en at lists.omnis-dev.com>
>> Subject: Re: List Definition
>>
>> The way to use indirection with list.$define() is
>>
>> Calculate define as con("$define(",fld1,',',fld2,',',fld3,')') or
>> con("$define('",fileClass,"')")
>> Do myList.[define]
>>
>> Kelly
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com Start a
>> new message -> mailto:omnisdev-en at lists.omnis-dev.com
>>
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com Start a
>> new message -> mailto:omnisdev-en at lists.omnis-dev.com
>
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
More information about the omnisdev-en
mailing list