hai all i have requirement
i have form like show above there i can create a leave request in line details "leave type" feild is there that is master data through foreign key relation i am getting drop down and ill select leave type is "CL"
and ill save the record.
now i have one setup for leave type form is like this
![]()
this is leave setup form for "CL" we can take another leave "VL" this is basic setup.
now iam going to first form
![]()
i already applied a leave type is "CL" so as per my setup i can apply "VL" also
if apply second time in that drop down only "VL" should come because of in setup i have given "VL" for "CL"
for that drop down i have overwrite the lookup method in leave type code is shown bellow.
public void lookup()
{
LeaveReqHeader _LeaveReqHeader;
LeaveReqLine _ _LeaveReqLine;
Query query= new Query();
QueryBuildDataSource qbds,qbds1;
QueryBuildRange qbr;
VacationTypeLineTBL _VacationTypeLineTBL;
VacationType _VacationType;
_LeaveTypeMasters _LeaveTypeMasters;
SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(VacationTypeLineTBL), this);
select _LeaveReqHeader;
select count(RecId) from _LeaveReqLine where _LeaveReqLine.LeaveReqId==_LeaveReqHeader.LeaveReqId;
if(_LeaveReqLine.RecId >= 1)
{
qbr = qbds1.addRange(fieldNum(VacationTypeLineTBL, LeaveTypeMasters));
while select _VacationType
{
select _VacationTypeLineTBL join _LeaveTypeMasters where _VacationTypeLineTBL._LeaveTypeMasters==_LeaveTypeMasters.RecId
&& _VacationTypeLineTBL.SerialNumber==_VacationType.SerialNumber;
qbr.value(int642str(_VacationTypeLineTBL.ITTI_LeaveTypeMasters));
sysTableLookup.addLookupField(fieldNum(_VacationTypeLineTBL, _LeaveTypeMasters),true);
sysTableLookup.addLookupField(fieldNum(_VacationTypeLineTBL, LeaveCodeDescription),true);
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
}
}
}
if use this code in debugger i am getting correct value but drop is not coming its in disabled stage......
note:
1.VacationType ,VacationTypeLineTBL these two tables belongs to my leave setup form one is header and line
2.LeaveReqHeader , LeaveReqLine these tow tables belongs two leave apply form tables
this my code please review and help me out what is the mistake in that any other way to filter data
thanks in advance.....