smartlist dowork

TBS andyh at totallybrilliant.com
Mon Apr 11 14:14:26 UTC 2022


Martin

The first thing I would check is :

Is your $smartlist set to kTrue ? I always start my dowork methods by checking the list is in the right state for this !!

So in your example btnUpdate: $event method, start with (I guess) :

If  iOrgGeneralPrefList.$smartlist = kTrue
Do iOrgGeneralPrefList.$dowork() Returns #F
else
Message back the error
End if

Andy Hilton
Totally Brilliant Software Inc
Phone (US) : (863) 409 4870
Phone (UK) : 0207 193 8582
Web : www.totallybrilliant.com
Helpdesk : http://totallybrilliant.kayako.com
Email : andyh at totallybrilliant.com
On Apr 11, 2022, 8:08 AM -0400, Martin Obongita via omnisdev-en <omnisdev-en at lists.omnis-dev.com>, wrote:
> Hi All
> I am trying to update a smartlist with the following methods:
> btnUpdate: $event
> Do iOrgGeneralPrefList.$dowork() Returns #F
>
> taSuperTable: $dowork
> Do $cinst.$first()
>
> While $cinst.$line>0
>
> Switch $cinst.$status
>
> Case kRowDeleted
>
> Do $cinst.$delete()
>
> Case kRowInserted,kRowUpdated
>
> Do $cinst.$save()
>
> End Switch
>
> Do $cinst.$next()
>
> End While
>
> Quit method #F
>
> taSuperTable: $save
> If $cinst.[iPrimaryKeyName]>0 ## already primary key value
>
> Do $cinst.$update($cinst) Returns #F
>
> Else
>
> Do $cinst.$insert() Returns #F
>
> End If
>
> The flag in the btnUpdate $event returns kTrue.        But the changes in the smartlist are not updating the table in the database.
> Where in my code am I going off the rails?
> As always, I appreciate all your kind helps.
> Martin.
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com


More information about the omnisdev-en mailing list