Welcome! Log In Create A New Profile

Advanced

Filter 2nd table using composite key problem.

Posted by Kevin Jackson.pcs.crosspost 
Kevin Jackson.pcs.crosspost
Filter 2nd table using composite key problem.
February 19, 2009 05:46PM
Hi,

Just recently moved over to windev development for a project that can't be done easily in my normal development language. Windev is great as it provides access to SOAP which I need in this program.

What I'm have intermitant programs with is I've two files the child one has a unique three field composite index on it, two of these fields can be found in the parent file. Now I populated both of these tables on the window fand put some code in the code area of the ROW SELECTION of the parent table. The code is as follows;

HDeactivateFilter(FTP_Actions)
HFilter(FTP_Actions,"Date = " + FTP_Log.Date + " AND Time = " + FTP_Log.Time)
TableDisplay(TABLE_FTP_Actions, taCurrentRecord)

This limits the contents of table 2 to the records i wish. Now all of the parent records have associated records that should display in the second table. But nothing shows on some of them, 90% of the time it works perfectly.

Anyone have any ideas?

Best Regards,


Kevin.


Message forwarded from pcsoft.us.windev
Piet van Zanten
Re: Filter 2nd table using composite key problem.
February 19, 2009 08:14PM
Hi Kevin,

You should use taInit instead of taCurrentRecord

Regards,
Piet
hfilter (FileName, CompositeKeyName, [MinValue1, MinValue2],[MaxValue1, MAxValue2])

//HFilter(FTP_Actions,"Date = " + FTP_Log.Date + " AND Time = " + FTP_Log.Time)

Maybe you will see difference between syntax and your Hfilter()
MinValue1 & MinValue2 also MaxValues can be same.

I hope this will help you !





Edited 2 time(s). Last edit at 02/19/2009 09:57PM by ICI.
Kevin Jackson.pcs.crosspost
Re: Filter 2nd table using composite key problem.
February 20, 2009 09:57AM
Hi Fabrice,

Thanks very much, that worked 100%, as I'm fairly new to Windev I'll just work out what your hfilter syntax is doing that mine was not 10% of the time.

Best Regards,

Kevin.

Fabrice Harari wrote in news message <499daec4@news.pcsoft.fr>:
> Hi kevin...
>
> Without seeing in details your app, it's hard to say, but there are 2
> things you could try:
>
> 1. if you have a composite key on the secondary file, you can use the
> composite key syntax instead:
> hFilter(FTP_Actions,CompositeKeyName,[FTP_Log.Date,FTP_Log.Time,
> hminVal],[FTP_Log.Date,FTP_Log.Time, hmaxVal])
>
> 2. Then do a tabledisplay with the INIT parameter (you do not want to
> refresh the table here, but replace it's content)
>
> best regards
>
> --
> Fabrice Harari
> International WinDev, WebDev and WinDev mobile Consulting
>
> More information on [www.fabriceharari.com]
>
>
> Kevin Jackson wrote:
> > Hi,
> >
> > Just recently moved over to windev development for a project that can't be done easily in my normal development language. Windev is great as it provides access to SOAP which I need in this program.
> >
> > What I'm have intermitant programs with is I've two files the child one has a unique three field composite index on it, two of these fields can be found in the parent file. Now I populated both of these tables on the window fand put some code in the code area of the ROW SELECTION of the parent table. The code is as follows;
> >
> > HDeactivateFilter(FTP_Actions)
> > HFilter(FTP_Actions,"Date = " + FTP_Log.Date + " AND Time = " + FTP_Log.Time)
> > TableDisplay(TABLE_FTP_Actions, taCurrentRecord)
> >
> > This limits the contents of table 2 to the records i wish. Now all of the parent records have associated records that should display in the second table. But nothing shows on some of them, 90% of the time it works perfectly.
> >
> > Anyone have any ideas?
> >
> > Best Regards,
> >
> >
> > Kevin.
> >
> >

Message forwarded from pcsoft.us.windev
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: