Telling if something has changed
Andy Hilton
andyh at totallybrilliant.com
Thu Jun 4 16:11:50 EDT 2020
Just to add a small but brilliant part of smart lists…..
You can filter them, so you have your list of stuff - for example lets say 50 lines in your list……the user does a bunch of whatever they do…..
If a list is ’smart’ you can then do things like :
# Reduce the list to the deleted lines only.
Do irListRow.$includelines(kRowDeleted)
Or
# Reduce the list to the inserted lines only.
Do irListRow.$includelines(kRowInserted)
Or
# Reduce the list to the updated lines only.
Do irListRow.$includelines(kRowUpdated)
And of course not forgetting putting it back again after doing your stuff :
# Show all the lines that would be visible in the normal list.
Do irListRow.$includelines(kRowInserted+kRowUpdated+kRowUnchanged)
All of which make it a dream to deal with ‘what to do’ when the user has finished……smart lists are just totally brilliant :)
Andy Hilton
Totally Brilliant Software Inc
Phone (US) : (863) 409 4870
Phone (UK) : 0207 193 8582
Web : www.totallybrilliant.com <http://www.totallybrilliant.com/>
Helpdesk : http://totallybrilliant.kayako.com
Email : andyh at totallybrilliant.com
> On Jun 4, 2020, at 3:39 PM, Doug Easterbrook <doug at artsman.com> wrote:
>
> short answer. smartlists in table classes
>
>
> the way we use it is .
> read record into list (defined from sql class)
> set smartlist mode on the list to true
>
> change data on the screen. *****
>
> update database
> set smartlist mode false
>
>
>
>
> when you set a list, defined on sql class, to smart list, omnis automatically created a duplicate set of columns that you can refer to as the $history
>
>
> so you can compare list.field1 to list.$history.field1
>
>
> most times you don’t have to.
>
>
> since you can interrogate each line in the smart list to find out if it was inserted, updated or deleted.
>
>
>
> thats a real limited explanation of a complicated concept ….
>
> the keys to look at in the documentation for examples are
>
> $history
> $smartlist
> $definefromsqlclass
>
>
> and those all get linked together for something really really powerful.
>
>
>
>
>
>
>
>
>
>
> Doug Easterbrook
> Arts Management Systems Ltd.
> mailto:doug at artsman.com
> http://www.artsman.com
> Phone (403) 650-1978
>
>> On June 4, 2020, at 10:12 AM, Das Goravani <das at Goravani.com> wrote:
>>
>>
>> Hello all
>>
>> Any ideas on “telling if some data has changed” in a complex situation where there are many fields in a file, some rows, that could have changed.. when they close the window.. to be able to tell if something has changed, is there an easy way?
>>
>> How does one track if something has changed.. the hard coded way seems big.. putting code in all places where something could change that tracks if something has.. seems like a big retrofit task
>>
>> I’m wondering if there’s a compare function I’ve overlooked.. or a technique I haven’t thought of
>>
>> Any input appreciated
>>
>> Das
>> _____________________________________________________________
>> 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