Home » Developer & Programmer » Forms » same LOV can fetch differet record for different user ?  () 1 Vote
same LOV can fetch differet record for different user ? [message #219187] Tue, 13 February 2007 09:25 Go to next message
asmani
Messages: 47
Registered: February 2007
Member
Dear All,

Is it possible to code LOV(same LOV) to fecth differet recode for different users.

kind regards.


Re: same LOV can fetch differet record for different user ? [message #219204 is a reply to message #219187] Tue, 13 February 2007 10:00 Go to previous messageGo to next message
MarcL
Messages: 455
Registered: November 2006
Location: Connecticut, USA
Senior Member
You can create and populate the LOV dynamically once you know what data you want to present.

Re: same LOV can fetch differet record for different user ? [message #219217 is a reply to message #219187] Tue, 13 February 2007 10:35 Go to previous messageGo to next message
asmani
Messages: 47
Registered: February 2007
Member
Dear Marc,

Do you have any example of that? if yes then send it to me, I would be very greatfull to you.

bcz I am stock at the moment.

Thanks for your reply

Usman
Re: same LOV can fetch differet record for different user ? [message #219234 is a reply to message #219187] Tue, 13 February 2007 11:22 Go to previous messageGo to next message
MarcL
Messages: 455
Registered: November 2006
Location: Connecticut, USA
Senior Member
I don't have an example as I am no longer developing in forms.

But there is a way to populate a record group and associate it with an LOV.

Sorry I don't have specifics
Re: same LOV can fetch differet record for different user ? [message #219423 is a reply to message #219187] Wed, 14 February 2007 05:59 Go to previous messageGo to next message
asmani
Messages: 47
Registered: February 2007
Member
Hi,

Anyway thanks for your help,
After very hard knock now I sorted my problem and the solution is following

Create a new record group (GTVNTYP_NEW) and add next bit in when_new_block_instance

DECLARE

lov_id LOV;
TMP_USER VARCHAR2(60);

BEGIN

TMP_USER := GET_APPLICATION_PROPERTY(USERNAME);
IF TMP_USER = 'UA' THEN
lov_id := Find_LOV('GTVNTYP_LOV');
Set_LOV_Property(lov_id,GROUP_NAME,'GTVNTYP_NEW');
END IF;

END;



Re: same LOV can fetch differet record for different user ? [message #219837 is a reply to message #219187] Fri, 16 February 2007 04:58 Go to previous message
dude4084
Messages: 222
Registered: March 2005
Location: Mux
Senior Member
hi

Do the records belong to same table?


if so then here is an easy solution


Suppose Usman can see employees name of dep no 10 only
while dude can see employees name of all depts.

Here is basic SQL of LOV


Select ename
from emp
where ((user='USMAN' and dept=10) or
(user='DUDE' and dept=dept))


Thats All.
I hope that the above SQL will help you to find solution of your problem.
Previous Topic: LOV form errors when using objects
Next Topic: Procedure without all the parameters sent to it
Goto Forum:
  


Current Time: Sat Feb 08 18:59:59 CST 2025