amolpk
20th March 2006, 12:05
Hello,
I want a display subsession which attatched to zoom session of main,
In one of customized table there are three fields and a primary key is nothing
but combination of three filelds,
I want display subsession should show all records for user who is login and running that session.
how can i achive this..
Amol
mark_h
20th March 2006, 15:18
Assuming that login is part of the table on the sub-session, then you can use the query.extension and use logname$. Something like "table.logn = logname$".
amolpk
24th March 2006, 06:35
Hi got ur answere,
my code is as below :
table contains only three fields, and my primary key is combination of these
three fields. where deptcode, username, dimention type stored in table.
extern domain tfgld.user lgn
|****************************** form section **********************************
before.program:
lgn =""
lgn = logname$
select tfkcl001.*,tfgld010.*
from tfkcl001,tfgld010
where tfkcl001.dimx = tfgld010.dimx
selectdo
endselect
main.table.io:
after.read:
if tfkcl001.dimx = tfgld010.dimx then
skip.io("")
endif
|****************************** choice section ********************************
can u plz guide where required modification into it..
from
Amol
bdittmar
24th March 2006, 10:53
Hi got ur answere,
my code is as below :
table contains only three fields, and my primary key is combination of these
three fields. where deptcode, username, dimention type stored in table.
extern domain tfgld.user lgn
|****************************** form section **********************************
before.program:
lgn =""
lgn = logname$
select tfkcl001.*,tfgld010.*
from tfkcl001,tfgld010
where tfkcl001.dimx = tfgld010.dimx
selectdo
endselect
main.table.io:
after.read:
if tfkcl001.dimx = tfgld010.dimx then
skip.io("")
endif
|****************************** choice section ********************************
can u plz guide where required modification into it..
from
Amol
Do you need something like this ?
select tfkcl001.*,tfgld010.*
from tfkcl001,tfgld010
where tfkcl001._index1 inrange {deptcode from , logname$}
and {deptcode to, logname$}
and tfkcl001.dimx = tfgld010.dimx
selectdo
endselect
Regards
mark_h
24th March 2006, 15:23
Follow this link (http://www.baanboard.com/baanboard/showthread.php?t=10017&highlight=rebuild.query) to learn more about query.extension.
before.program:
query.extension = "tfkcl001.logn = " & chr$(34) & logname$ & chr$(34)
Assuming the maintable is tfkcl001 and ".logn" is the field name.
amolpk
25th March 2006, 11:37
Hi,
I tried the following code, but in display session now it shows only one record, though their three records present for current user.
can u guide whats wrong in this code.
/* program start */
before.program:
query.extension = "tfkcl001.user = " & chr$(34) & logname$ & chr$(34)
select tfkcl001.dimx, tfkcl001.user,tfgld010.dimx,tfgld010.desc
from tfkcl001,tfgld010
selectdo
endselect
/* program end */
mark_h
27th March 2006, 16:36
What is the select statement for? Is this a multi-occurance session? You might want to also check your data and make sure logname$ actuall matches what is in the table.