Home » Developer & Programmer » Forms » restrict LOV in multi-user environment?
restrict LOV in multi-user environment? [message #142665] Mon, 17 October 2005 02:38 Go to next message
s4sam
Messages: 18
Registered: October 2005
Location: pakistan
Junior Member
hi to all,
I am in a prob. for 3 days. i want to restrict the LOV that once the user selects a value from LOV it must not be shown in LOV again. I have used
declare
b boolean;
begin
post;
b := show_lov('ord_lov');
end;
in when-button-pressed. It works but in multiuser environment , when the same form is opened at more than one client's end , the form helds for 2nd user until 1st user closes the same form. Is there any way to handle this LOV restriction in multi-user environment. Help me plz
Re: restrict LOV in multi-user environment? [message #142812 is a reply to message #142665] Mon, 17 October 2005 18:22 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Okay. Two choices.

One - I have no idea if it will work but can you make the query 'FOR READ ONLY'? Does this change the behaviour?

Two - build the record group manually (in the pre-query or when-newform-instance) and remove an entry from it when the user selects it. Search this forum for 'record group' and 'record_group' to see how other people have built their manual record groups.

David
Re: restrict LOV in multi-user environment? [message #142856 is a reply to message #142665] Tue, 18 October 2005 01:10 Go to previous messageGo to next message
s4sam
Messages: 18
Registered: October 2005
Location: pakistan
Junior Member
thanks it solved the problem.
Re: restrict LOV in multi-user environment? [message #142857 is a reply to message #142856] Tue, 18 October 2005 01:15 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Which? One or two?

David
Re: restrict LOV in multi-user environment? [message #142892 is a reply to message #142857] Tue, 18 October 2005 04:46 Go to previous message
s4sam
Messages: 18
Registered: October 2005
Location: pakistan
Junior Member
Ihave used the 2nd option.
It solved my problem.

declare
     rec_count		number;
     lAsk					BOOLEAN :=FALSE;
begin
     -- Change LOV's record group
     set_lov_property('LOV_CODE',GROUP_NAME,'RGR_CODE_PART');
     -- Call LOV
     lAsk:=show_lov('LOV_CODE');
     -- Come back LOV's record group
     set_lov_property('LOV_CODE',GROUP_NAME,'RGR_CODE_FULL');
     -- if value selected then removed it from second record group
    if lAsk then
       rec_count:=get_group_row_count('RGR_CODE_PART');     
       for j in 1..rec_count loop
        if get_group_char_cell('RGR_CODE_PART.DESCRIPTION',j) =  :products.description then
               delete_group_row('RGR_CODE_PART',j);
               exit;
            end if;
        end loop;
     end if;
end;


Upd-mod: Add code tags.

[Updated on: Tue, 18 October 2005 17:51] by Moderator

Report message to a moderator

Previous Topic: What is full form of .PLL Library
Next Topic: how to display values in list item from a querry?
Goto Forum:
  


Current Time: Fri Sep 20 05:00:20 CDT 2024