I have
select tweight, nweight, NPERLOSSATPIP,lnotes,calive,ldrilled,nveingrowth from deggweight where deggweight.cfk_dweight = {degg.cpk_degg}
Where is the best place to call the refresh as the degg records change?
I have
select tweight, nweight, NPERLOSSATPIP,lnotes,calive,ldrilled,nveingrowth from deggweight where deggweight.cfk_dweight = {degg.cpk_degg}
Where is the best place to call the refresh as the degg records change?
In the datachanged delegate or the afterrefresh delegate.
Principal developer of Lianja, Recital and other products
Follow me on:
Twitter: http://twitter.com/lianjaInc
Facebook: http://www.facebook.com/LianjaInc
LinkedIn: http://www.linkedin.com/in/barrymavin
Hi Barry,
The delegate of the control, the section it is on or the section with the parent data?
David
Hi Barry,
I've tried this and when I use
select tweight,nweight,nperlossatpip,lnotes,calive,ldrill ed,nveingrowth from deggweight where deggweight.cfk_dweight = {degg.cpk_degg}
I get an empty treegrid.
without the where clause it shows all records from deggweight
I know I'm refreshing the grid as I have code in the parent section
////////////////////////////////////////////////////////////////
// Event delegate for 'datachanged' event
proc page1_EggData_datachanged()
Lianja.getElementByID("page1.EggWeight.EggWeightGr id").caption = ttoc(datetime())
Lianja.getElementByID("page1.EggWeight.EggWeightGr id").refresh()
// insert your code here
endproc
Can you please tell me what I'm doing wrong in the where clause here.
David
deggweight.cfk_dweight = {degg.cpk_degg}
Can you use that from the LAB Command Window and it works?
HI Hank,
Thanks for posting that I see my mistake
should be of course
deggweight.cfk_degg = {degg.cpk_degg}
Jumped out at me when I saw it in your post
LOL
It would have jumped out at you if you had tried running it from the Command Window also. That's why I didn't question what looked like a wrong reference. I didn't know that it was, but knew that if it was you'd find out.
Still des not work though
In the console if I use
use degg in 0
select degg
select tweight, nweight, NPERLOSSATPIP,lnotes,calive,ldrilled,nveingrowth from deggweight where deggweight.cfk_degg = degg.cpk_degg
I get a result set, albeit all of them not the juts for one egg
If I try
select tweight, nweight, NPERLOSSATPIP,lnotes,calive,ldrilled,nveingrowth from deggweight where deggweight.cfk_degg = {degg.cpk_degg}
I get a data type mismatch error
If I have it in the treegrid it shows no results
If I use in the console
lceggpk = degg.cpk_degg
select tweight, nweight, NPERLOSSATPIP,lnotes,calive,ldrilled,nveingrowth from deggweight where deggweight.cfk_degg = lceggpk
I get the correct result
What is the LAB Command Window ?
Looked in the docs but no result, so tried in the console, but I need to be referring the page really as it has one record for degg
Last edited by avianmanagement; 2022-03-22 at 21:50.
IN the treegrid control if I use
select tweight,nweight,nperlossatpip,lnotes,calive,ldrill ed,nveingrowth from deggweight where deggweight.cfk_dweight = degg.cpk_degg
it shopws all the records for the match, but for all eggs
If I use
select tweight,nweight,nperlossatpip,lnotes,calive,ldrill ed,nveingrowth from deggweight where deggweight.cfk_dweight = {degg.cpk_degg}
I get nothing. I've moved through every egg juts in case the one I was testing had not results, but none of them display any data
You can't use {macros} in the command window. They will only be ubstituted in the UI.
What datatype is cpm_degg? It its character you need to enclose it in quotes.
Just try this:
select tweight, nweight, NPERLOSSATPIP,lnotes,calive,ldrilled,nveingrowth from deggweight where cfk_degg = "{degg.cpk_degg}"
Principal developer of Lianja, Recital and other products
Follow me on:
Twitter: http://twitter.com/lianjaInc
Facebook: http://www.facebook.com/LianjaInc
LinkedIn: http://www.linkedin.com/in/barrymavin
Bookmarks