Welcome! Log In Create A New Profile

Advanced

Table filtering advice required...

Posted by DarrenF 
DarrenF
Table filtering advice required...
January 21, 2009 12:32PM
Hi guys,

I'm looking for a bit of "Best Practice" advice on something I'm trying to do.

I have a pretty ordinary window with a Table, a few input fields, New and Save buttons on it. I'm filtering the Table on a field using the filtering on the Content properties of the Table object.

When the "New" button is pressed I issue HReset & Reset that puts the window into "add" mode (or so I thought), because when I hit the "Save" button, my code uses "..NewRecord = True" to decide if we're in add or modify mode, but it seems to think it's in modify mode.

I've carried out some tracing/debugging and it looks as thought the filtering may be causing the problem - is this a correct assumption?

Thanks in advance for any help...
Jaime Fernandez
Re: Table filtering advice required...
January 22, 2009 02:34PM
Hi Darren,

First, you must do a PagetoFile(Pagename,filename) and after:
if filename..newrecord = true then
hadd(filename)
else
hmodify(filename)
end

Regards
DarrenF
Re: Table filtering advice required...
January 22, 2009 03:44PM
Hi,

Yes, thanks for that...

During my investigations I discovered that there's also a whole host of Wlang commands that can affect the ..NewRecord mode property - these being:

HAdd
HWrite
HRead
HReadLast
HReadPrevious
HReadFirst
HReadSeek
HReadNext
HModify
HCross
HRestorePosition
HDelete
FOR EACH File
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: