[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

FRM 41032: cannot set enabled attribute of current item B00.CB_EMAIL

Posted on 2009-06-29
8
Medium Priority
?
4,292 Views
Last Modified: 2013-12-19
Hi Folks,

I am getting the error as shown below in the screenshot. I just changed the background of the form. It was dark in color, so I changed it to brighter colors and pasted everything inside the rectangular boxes. There was no change in the code.

Please could you let me know, what could be the reason for this error?

Thanks in advance,
   Vishal
form5-screen1.JPG
0
Comment
Question by:vishal_singh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 12

Expert Comment

by:jwahl
ID: 24742903
this error has nothing to do with changing color attributes. maybe it was here before but didn't pop up?
the item B00.CB_EMAIL has the cursor focus when you try to enable. search your code for the SET_ITEM_PROPERTY('B00.CB_EMAIL', ENABLED, PROPERTY_TRUE) and navigate to another item before you enable it.
0
 

Author Comment

by:vishal_singh
ID: 24746282
Hi Jwahl,

I have found out that piece of code in a program unit. so, what's the next thing I have to do with it. Could you please explain where to navigate. I have also attached the code, in which I found it.

Please suggest me what to do next.

Thanks in advance,
 Vishal
PROCEDURE set_user_access IS
 
  tcnt number;
  rval number;
 
BEGIN
 
  -- get username from application
  :b00.user_login := get_application_property(username);
 
  -- get access level from segment_user
  select access_level
  into :b00.acc_level
  from segment_user
  where user_login = :b00.user_login;
 
  -- limit oc access
  -- level 1 & 2 users have access to all OCs
  if :b00.acc_level in ('1','2') then
  	:b00.user_oc   := 'ALL';
  elsif :b00.acc_level in ('3','4','5','6') then
  	
    -- all other users only have access to OCs specified in SEGMENT_USER_ATTRIB table
    SELECT COUNT(*)
    INTO TCNT
    FROM SEGMENT_USER_ATTRIB
    WHERE USER_LOGIN = :B00.USER_LOGIN
    AND   ATTRIB_ID  = 'OC';
  	
    IF TCNT > 0 THEN
      :b00.user_oc := 'SELECT';
    ELSE
      :B00.USER_OC := 'NONE';
    END IF;
 
  else
    :B00.USER_OC := 'NONE';
  end if;
  
  --set the email feature
/* not yet!  8/11/03 */
/* TDK: Enabled 1/9/04 */
  select COUNT(*)
  into :b00.email_addr_cnt
  from segment_user_email
  where user_login = :b00.user_login;
 
  if :b00.email_addr_cnt > 0 then
 
  ------------------  
    Begin
  	SET_ITEM_PROPERTY('b00.cb_email',ENABLED,PROPERTY_TRUE);
    exception
    	when others then
    	null;
    end; 	
----------------------------
 
    if :b00.email_addr_cnt > 1 then
    	:b00.email_addr := 'choose...';
    	
 	    rval := populate_group('RG_USER_EMAIL_ADDR');
      populate_list('B01.LI_EMAIL_ADDR', 'RG_USER_EMAIL_ADDR');
      :b01.li_email_addr := get_list_element_value('b01.li_email_addr',1);
 
    else
    	select email
    	into :b00.email_addr
    	from segment_user_email
    	where user_login = :b00.user_login;
    end if;
    
  else
  	SET_ITEM_PROPERTY('b00.cb_email',ENABLED,PROPERTY_FALSE);
  	SET_ITEM_PROPERTY('b00.cb_email',TOOLTIP_TEXT,'You do not have access to this feature, Please contact the system administrator to change your privileges.');
  end if;
 
  -- allow restricted rebate access?
  select count(*)
  into tcnt
  from segment_user_attrib
  where user_login = :b00.user_login
  and   attrib_id  = 'RSTRREB'
  and   nvl(attrib_value,'N') = 'Y';
  
  -- if have restricted access, show checkbox
  if tcnt > 0 then
 
    :b00.rstr_access := 'Y';
    :b00.rstr_ok     := 'Y';
 
  else
  	:b00.rstr_access    := 'N';
  	
  	-- hide checkbox
  	set_item_property('b00.rstr_ok',visible,property_false);
  	:b00.rstr_ok     := 'N';
  	
  end if;
 
END;

Open in new window

form5-cb-error.JPG
0
 
LVL 12

Accepted Solution

by:
jwahl earned 2000 total points
ID: 24746547
in line 51 change

            SET_ITEM_PROPERTY ('b00.cb_email', enabled, property_true);

to

         IF :SYSTEM.CURSOR_ITEM = 'B00.CB_EMAIL' THEN
            NEXT_ITEM;
            SET_ITEM_PROPERTY ('b00.cb_email', enabled, property_true);
            GO_ITEM('B00.CB_EMAIL');
         ELSE
            SET_ITEM_PROPERTY ('b00.cb_email', enabled, property_true);
         END IF;

if the cursor focus is into a particular item, you can't enable or disable it. so, move to the next item, enable the item and move back to the previous item.

btw: you've defined an exception handler WHEN OTHERS THEN NULL;
this may be the reason why no message pops up when an exception occurs ...!?
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 

Author Closing Comment

by:vishal_singh
ID: 31598134
thank you very much
0
 

Author Comment

by:vishal_singh
ID: 24749285
Hey Jwahl,

This error again popped up when I moved to production data base.
Earlier I was working on TEST DB, and your solution worked perfectly fine.
Please let me know what to do..
0
 
LVL 12

Expert Comment

by:jwahl
ID: 24749321
hard to say ...
what's different to your production server?
0
 

Author Comment

by:vishal_singh
ID: 24749411
I dont think there is much of a difference in prod server. I just ran it in TEST DB and it was working fine. And when I disconnected and connected to PROD DB it pops up this error again.
0
 

Author Comment

by:vishal_singh
ID: 24749477
How else do you think we can resolve it

Thanks in advance,
   Vishal
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question