Add_List_Element [message #381802] |
Mon, 19 January 2009 23:26  |
varosh81
Messages: 178 Registered: February 2008 Location: CHENNAI
|
Senior Member |
|
|
Hi All!
I have an list item called EMPLOYEEID in my form .. I didnt give any default values to it through property palette..
The coding i used is,
Trigger:PRE-BLOCK BLOCK NAME:HODAL
BEGIN
if :GLOBAL.EMPLOYEEID='1111' then
message('xx');
Add_List_Element('HODAL.EMPLOYEEID',1,'2','2');
Add_List_Element('HODAL.EMPLOYEEID',2,'3','3');
elsif :GLOBAL.EMPLOYEEID='2222' then
message('yy');
Add_List_Element('HODAL.EMPLOYEEID',1,'234','234');
end if;
end if;
END;
The message in both clause is not getting displayed ..
Now the if clause is working well but not the else clause..
pls help to overcome this issue ..
Thanks and Regards,
varosh
|
|
|
|
|
Re: Add_List_Element [message #381815 is a reply to message #381803] |
Tue, 20 January 2009 00:34   |
varosh81
Messages: 178 Registered: February 2008 Location: CHENNAI
|
Senior Member |
|
|
Hi Sir !
Iam new to this populate_list concept ..
I created an LOV as u suggested(Created button near my field employeeid on clicking it default values are getting displayed).. while creating i gave the default values as 2 and 3..
After which i created another static record group with a value '234'
Now i used the coding :
Trigger: PRE-BLOCK
declare
list_id item;
rg_id recordgroup;
BEGIN
if :global.employeeid='2222' then
list_id:=find_item('EMPLOYEEID');
rg_id:=find_group('RECORD_GROUP44');
CLEAR_LIST(list_id);
POPULATE_LIST(list_id, 'rg_id');
end if;
end;
Now the default values are not getting removed and the value i specified for new record group is not getting populated..
Have i made any mistake in the code or procedure to create this lov and record group?
please help!
Thanks and Regards,
varosh
|
|
|
|
Re: Add_List_Element [message #381830 is a reply to message #381822] |
Tue, 20 January 2009 01:08   |
varosh81
Messages: 178 Registered: February 2008 Location: CHENNAI
|
Senior Member |
|
|
Hi !
Even if i didnt specify the condition, the record group is not populating the list ..
pls help
Thanks and Regards,
varosh
|
|
|
Re: Add_List_Element [message #381897 is a reply to message #381830] |
Tue, 20 January 2009 04:18   |
varosh81
Messages: 178 Registered: February 2008 Location: CHENNAI
|
Senior Member |
|
|
Hi !
I tried to check condition in LOV..
I mean if one condition get satisfied i want one LOV1 to be displayed otherwise other LOV2 to get displayed..
So i tried with the coding
trigger:when button pressed (placed a button near a txt item employeeid)
Declare
Return_LOV Boolean;
Begin
If :global.employeeid='1111' then
Return_LOV :=show_LOV('LOV1');
elsif :global.employeeid='2222'then
Return_LOV :=show_LOV('LOV2');
end if;
End;
But the else clause not working.. The LOV1 alone is getting displayed..
Pls help..
Thanks and Regards,
varosh
|
|
|
|
Re: Add_List_Element [message #382086 is a reply to message #381942] |
Tue, 20 January 2009 22:50   |
varosh81
Messages: 178 Registered: February 2008 Location: CHENNAI
|
Senior Member |
|
|
Hi sir!
Thanks for your reply!
For global variable, tried with the coding,
Trigger: when button pressed
Block:B form:form1
:GLOBAL.EMPLOYEEID:=:emplogin.EMPLOYEEID; /* Here emplogin is one of the block of a form, form1 */
CALL_FORM('D:\DevSuiteHome_1\forms\FAIR\FAIR 1\hod-al');
In the hod-al form i havent given any default values for the list item EMPLOYEEID..
I have placed a button near listitem EMPLOYEEID.. And the coding given for the button is,
Trigger:when button pressed
Declare
Return_LOV Boolean;
Begin
if :global.employeeid='1111' then
message('xx');
Return_LOV :=show_LOV('emp_LOV');
elsif :global.employeeid='2222' then
message('yy');
Return_LOV :=show_LOV('LOV45');
else
message('no lov');
end if;
End;
Now in the above coding the messages in if,elsif,else clauses are not getting displayed..
But the values of emp_LOV in if clause is getting generated unlike the elsif clause..
Pls help to overcome this issue!
Thanks and Regards,
varosh
|
|
|
|
Re: Add_List_Element [message #382156 is a reply to message #381942] |
Wed, 21 January 2009 03:35  |
varosh81
Messages: 178 Registered: February 2008 Location: CHENNAI
|
Senior Member |
|
|
Hi sir!
All of a sudden my coding started working(before making the changes u said)..
So as of now my prob is solved ..
Thanks for your support..
Thanks and Regards,
varosh
|
|
|