Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 1 Jahr, 7 Monaten
Letzter Beitrag:
vor 1 Jahr, 7 Monaten
Beteiligte Autoren:
DerekT, Art Bonds

Record type as parameter

Startbeitrag von DerekT am 14.12.2016 14:29

Hi all

I have, by example, a record type populated with the values returned by a query.
recLandlord is a Record of Landlord

recLandlord = arrLandlord[TableSelect(tbl_arrLandlord)]

I can send this as a parameter to a report, window and even an internal window when using

However if I send it as a parameter when adding a Dynamic Tab it fails.

No compilation errors are generated but the receiving 'Record', whether set as dynamic or assigned to a file, is always Null.
Trying to process the receiving 'Record' generates an 'element was not allocated' error

I can overcome the issue by using global variables but this is a bit of a pain.

So is it me or an oversight on behalf of PCS for a variable type that is very useful.


Interesting, I was hoping I could do that in a future project I am planning.
If we cannot pass the record, how about passing the UniqueID of the record and looking it up over on the other side?

von Art Bonds - am 14.12.2016 17:36
Hi Art

Yes your option is indeed workable.
Seems you can pass any parameter you like to a Dynamic Tab except a Record variable.

To me though it all depends on the program logic employed.
In my case the query I had run returned the result of a search and as such contained the up to date records.
To send an ID and then have to fetch the record again seems to me an unnecessary overhead on the network.

If you have a table that has been open for a while then this would always be the best option.
However with Dynamic Tabs and previously MDI windows I have found that users just leave them open whether they are in use or not.
As a result of this I always refresh any open tables every minute - Noit foolproof I grant you but seems to serve its purpose.

von DerekT - am 14.12.2016 19:52
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.