PxPlus User Forum
Main Board => Discussions => Programming => Topic started by: dlocke on March 17, 2023, 10:15:21 AM
-
Hi
Can you assign a query to a cell at run time ?
I see a "query" property in the manual but I can an error 88 trying to access it.
Don Locke.
-
Technically the Query property doesn't exist (at least in Nomads -- in iNomads there is a property called CellQuery$ which you can alter dynamically). What Nomads does is maintain internal tables relative to the grid column/row with the query setting.
There really isn't a way to dynamically change this table but what we would suggest is assign a query that runs a program and in that program you can decide which actual query you want to run and should your logic decide there isn't a query, display an error message.
-
One thing I have done at run time is programmatically assign a 'celltype$ (such as Lookup, LookupHideBtn, Query, QueryHideBtn) to a grid cell. Then in the cell logic you can test for _EOM$=$FF$ to determine if the query or lookup button has been pressed and then do logic to invoke the query.
-
Thanks,
I have created the query in the presets and updated the code with work with it.
Don.