smartlist dowork

Martin Obongita martin.obongita at
Tue Apr 12 17:38:36 UTC 2022

 Hi Das,I sent them my library on the issue of $dowork, and they couldn't figure out why the method $save Do $cinst.$update($cinst) Returns #Fwas returning a false flag.So they left me with, we will get back to you when we find a solution.

    On Tuesday, April 12, 2022, 08:15:18 PM GMT+3, Das Goravani <goravanis at> wrote:  

I haven’t worked with smart lists much. When I did, I also had some trouble getting it right, getting it to work, but eventually was able to do so and I agree, smart lists are really cool.. 

I don’t know a slick way to test if a data connection is still active. I myself look at the SQL Browser in the Browser to see if the connection is still showing there (with sub lines like "Tables"..) written underneath the connection name. That tells me it’s still active. Sometimes I click on tables and make sure they are all listed to make sure my data connection is still valid. I code to verify I have a connection I 

Clear a row
Do a select that should populate that row
Test if data is in the row just by If myVar =1 (a certain column should have a 1 in it)

If I am able to fetch that record into that row then I have a valid data connection

So I actually test in that way sometimes. 

There may be much slicker ways of testing if a data connection is up and running. 

>From what I’ve read on here you are doing what is necessary to make smart lists work. 

I would agree with others who say that you should test if your data is happening.. make sure $insert and $update work, or one of them, then try the smart list. 

Smart lists are essentially simple.. they keep track of changes made to a table that they can easily represent in memory, or part of a table. 

You add lines, change lines, remove lines, and it remembers these things and "does" these changes to your data table with the "$do…" commands like $dowork()

That’s it. There’s nothing more to them. 

When I saw your code, a long piece, posted earlier in this thread, I got concerned about other things in it, and urged you to step through it and make sure it is stepping onto the lines you wanted.. but that piece of code was a manual approach to what the dowork command does automatically.. so I would recommend the $dowork command instead. 

Something else you said recently was cause for concern.. when you described what you are now doing.. why $excludefromupdate wasn’t needed.. I think it’s always needed with Postgres.. excluding the primary key from the columns submitted with either insert or update. I thought from what I’ve learned that this is always needed with postgres. 

I myself am connected to postgres now having successfully set it up on servers, learned how to use pgAdmin and so forth.. Postgres is my database now.. but I have not coded a lot with it yet.. I have yet to make my much used central called insert and update routines have the workings that postgres requires.. so I’m not that authoritative on postgres yet.. 

Hoping you find a way to make smart lists work. It may be in reducing the amount of code you use with them.. they are essentially really simple. 

All the best to you,

Das Goravani

Ps: I’m surprised Omnis support has given up on you on this. That’s surprising to hear. I once had a problem, with updating, and it was Jeramy who was helping me.. and he stayed until it was resolved. It turns out I was using not a real row variable to represent "old row" to the $update command.. everything looked right at first glance, but in fact I was using a character variable to hold the name of old row, I wasn’t passing an actual row variable.. we went around on other things for a long time and came back to this simple point which was the clincher.. so in the end it may turn out to be a really small thing that is stopping you.. 

Verify that data is working.. then try issuing the smart list commands, they should work straight away

Here’s to believing that bumble bees can fly and that Martin will get smart lists working !!!!

Manage your list subscriptions at
Start a new message -> mailto:omnisdev-en at 

More information about the omnisdev-en mailing list