Home » Developer & Programmer » Forms » Lov not work
Lov not work [message #602026] Thu, 28 November 2013 23:52 Go to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi,

When i select lov value from one column and select find button, but, it move to next cloumn not displays records to me

Please suggest me

Thank you
Re: Lov not work [message #602027 is a reply to message #602026] Fri, 29 November 2013 00:04 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
List of values is used to display a choice of values so that user could pick one of them. This part works for you, right? Therefore, you select a value: does it end up in an item it is mapped to? I suppose so.

What do you do then? Press <Enter> and focus is set into the next item? If so, that's expected.

If you want to see (query) records whose column's value match the one you picked from the LoV, you first have to enter query mode, select a value from a LoV, and - finally - execute query. Did you do that?

If nothing of the above fixes the issue, please, explain what you do, in details.
Re: Lov not work [message #602028 is a reply to message #602027] Fri, 29 November 2013 00:13 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi Littlefoot,

I create lov's on wizard method , is there any properties setting problem? and lov's list working fine , but when i select the value from lov and select find button , it is not display records it go to the next record(pointer)


Thank you
Re: Lov not work [message #602030 is a reply to message #602028] Fri, 29 November 2013 00:16 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What is the "find button"? Could you post a screenshot?
Re: Lov not work [message #602031 is a reply to message #602030] Fri, 29 November 2013 00:24 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi,

Please find the below screen shot on find button


Thank you
  • Attachment: image2.png
    (Size: 19.43KB, Downloaded 689 times)
Re: Lov not work [message #602032 is a reply to message #602031] Fri, 29 November 2013 00:25 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
This one also
  • Attachment: image1.png
    (Size: 18.80KB, Downloaded 711 times)
Re: Lov not work [message #602034 is a reply to message #602032] Fri, 29 November 2013 00:51 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
OK, so that is a button you created. I suppose there's a WHEN-BUTTON-PRESSED trigger on it. Could you post its code?
Re: Lov not work [message #602036 is a reply to message #602034] Fri, 29 November 2013 00:58 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi ,

Please find the below code
DECLARE
finalStr varchar2(5000);
dfinalStr varchar2(5000);
BEGIN
 
  --finalStr := 'where 1 = 1 ';
 
       IF :BLOCKNAME.ORGANIZATION_CODE IS NOT NULL THEN           
	  finalStr := ' and Organization Code  = '||(':BLOCKNAME.ORGANIZATION_CODE');
       end if;
    Go_Block('BLOCKNAME');
        --dfinalStr := GET_BLOCK_PROPERTY('BLOCKNAME',DEFAULT_WHERE);
	     SET_BLOCK_PROPERTY('BLOCKNAME',DEFAULT_WHERE,finalStr);				
     	finalStr := GET_BLOCK_PROPERTY('BLOCKNAME',DEFAULT_WHERE);
	    EXECUTE_QUERY;


Re: Lov not work [message #602037 is a reply to message #602036] Fri, 29 November 2013 01:03 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Try to modify this line
finalStr := ' and Organization Code  = '||(':BLOCKNAME.ORGANIZATION_CODE');

to
finalStr := ' and Organization Code  = '|| :BLOCKNAME.ORGANIZATION_CODE;
Re: Lov not work [message #602039 is a reply to message #602037] Fri, 29 November 2013 01:14 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi Littlefoot,

Not worked for me


Thank you
Re: Lov not work [message #602040 is a reply to message #602039] Fri, 29 November 2013 01:18 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Too bad ... display the WHERE clause so that you'd see what you are querying:
finalStr := GET_BLOCK_PROPERTY('BLOCKNAME',DEFAULT_WHERE);
message(finalstr);
message(finalstr);
EXECUTE_QUERY;

Then take the MESSAGE result and run it in SQL*Plus as
select * 
from <data_block_table>
where <contents of the MESSAGE result>

Post both MESSAGE screenshot and SQL*Plus session over here.
Re: Lov not work [message #602048 is a reply to message #602040] Fri, 29 November 2013 01:27 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi Littlefoot,

I confusing about where to and how to write where clause .could you please help me


Thank you
Re: Lov not work [message #602052 is a reply to message #602048] Fri, 29 November 2013 01:33 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
MESSAGE will display what you really used in that block when executing query. This is, as you put it, data block's DEFAULT WHERE clause. So take it from a form and put it into a SELECT statement you are supposed to write in SQL*Plus. It will look like
select * 
from your_table
where organization_code = 556   --> MESSAGE built-in will display this
Execute it, and you'll see the result (or not). Then do as I asked you: post a screenshot of the MESSAGE built-in result, as well as your SQL*Plus session.
Re: Lov not work [message #602056 is a reply to message #602052] Fri, 29 November 2013 01:57 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi Littlefoot,

Please find the below attachments


SQL>  select * from org_organization_definitions
  2   where  organization_code = 'CU1'
  3  /

ORGANIZATION_ID BUSINESS_GROUP_ID USER_DEFI DISABLE_D ORG ORGANIZATION_NAME                             
--------------- ----------------- --------- --------- --- ------------------------------------------
             44                 0 21-JAN-02           CU1 Cumberland 1                                  


  • Attachment: image1.png
    (Size: 35.31KB, Downloaded 685 times)
Re: Lov not work [message #602057 is a reply to message #602056] Fri, 29 November 2013 02:21 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi Littlefoot,

How can i rectify this issue can u help me?

Thank you
Re: Lov not work [message #602058 is a reply to message #602057] Fri, 29 November 2013 02:25 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
ORGANIZATION_CODE is VARCHAR2(3). It means that you'll have to enclose it into single quotes. Try this:
finalStr := ' and Organization Code  = '||chr(39)|| :BLOCKNAME.ORGANIZATION_CODE || chr(39);

[Updated on: Fri, 29 November 2013 02:25]

Report message to a moderator

Re: Lov not work [message #602059 is a reply to message #602058] Fri, 29 November 2013 02:48 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
calling Organization_Code by it's actual name would help:
finalStr := ' and Organization_Code  = :BLOCKNAME.ORGANIZATION_CODE';

Re: Lov not work [message #602100 is a reply to message #602059] Fri, 29 November 2013 07:02 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi Littlefoot and cookiemonster,

I am having 2 database block with having 2 DB Items(ORGANIZATION_CODE,FISCAL_YEAR) and I Created one FORECASTCONTROL non-database block and 2 non-database items(ORGANIZATION_CODE,FISCAL_YEAR) with adding 1 find button and below is the code and where (1) see below in the code , i wrote first begin working fine to me and add another begin -->(2) , not working when after i select FISCAL_YEAR LOV ,it points to the Previous Record in the ORGANIZATION_CODE.

Can we please help me what is the problem and how can i fix this issue?



DECLARE 
    finalstr  VARCHAR2(100); 
    dfinalstr VARCHAR2(100); 
BEGIN 
    BEGIN   -->(1)
        IF :FORECASTCONTROL.organization_code IS NOT NULL THEN 
          Go_block('BLOCKNAME'); 

          dfinalstr := Get_block_property('BLOCKNAME', default_where); 

          finalstr := 'where ORGANIZATION_CODE  = ' ||( ':BLOCKNAME.ORGANIZATION_CODE' ); 

          Set_block_property('BLOCKNAME', default_where, finalstr); 

          Execute_query(); 
        END IF; 
    END; -->(1)

    BEGIN  -->(2)
        IF :FORECASTCONTROL.fiscal_year IS NOT NULL THEN 
          Go_block('BLOCKNAME'); 

          finalstr := 'where FISCAL_YEAR  = ' ||( ':BLOCKNAME.FISCAL_YEAR' ); 

          Set_block_property('BLOCKNAME', default_where, finalstr); 

          Execute_query(); 
        END IF; 
    END; -->(2)
END; 


Thank you
Re: Lov not work [message #602101 is a reply to message #602100] Fri, 29 November 2013 07:17 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
mist598 wrote on Fri, 29 November 2013 13:02
not working when after i select FISCAL_YEAR LOV ,it points to the Previous Record in the ORGANIZATION_CODE.

I have no idea what that means
Re: Lov not work [message #602102 is a reply to message #602101] Fri, 29 November 2013 07:26 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi cookiemonster,

Quote:
I have no idea what that means


I wrote 1st begin for when i select Oganization_code , to display all the other fiscal_year record etc also and in the same, i wrote 2nd begin for when is select fiscal_year to display 'Oganization_code' record and etc records .

Could you please suggest me

Thank you
Re: Lov not work [message #602103 is a reply to message #602102] Fri, 29 November 2013 07:51 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
That doesn't actually help me understand what this bit means:
Quote:

it points to the Previous Record in the ORGANIZATION_CODE


I'm trying to understand what it's currently doing in order to work out what the problem is, your vague explanation isn't helping.
Re: Lov not work [message #602105 is a reply to message #602103] Fri, 29 November 2013 08:00 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi cookiemonster,

When i select Org Code Lov it is working fine to me, but when i select Fiscal Year(2010) Lov and click on find button it not display below shown in the image and it points to the Org Code Lov . Please follow the below screen shot

/forum/fa/11327/0/

Thank you
  • Attachment: image1.png
    (Size: 8.67KB, Downloaded 1177 times)
Re: Lov not work [message #602120 is a reply to message #602105] Fri, 29 November 2013 12:14 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
This looks suspicious again:
 finalstr := 'where FISCAL_YEAR  = ' ||( ':BLOCKNAME.FISCAL_YEAR' ); 
Be so kind and display FINALSTR on the screen so that you'd see what it evaluates to.
Re: Lov not work [message #602156 is a reply to message #602120] Sat, 30 November 2013 08:45 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi littlefoot,

I wrote the below code in the FIND Button for oranization_code and fiscal_year, i create one non-database (FORECASTCONTROL) block and put the 2 items oganisation_code, fiscal_year and those items are also in the DB Block, code is work for me only organisation_code only , when i add same code for the fiscal year , other items are display except organisation_code.Why it is not working? Please suggest...

DECLARE 
    finalstr  VARCHAR2(100); 
    dfinalstr VARCHAR2(100); 
BEGIN 
    IF :FORECASTCONTROL.organization_code IS NOT NULL THEN 
      Go_block('BLOCKNAME'); 

      dfinalstr := Get_block_property('BLOCKNAME', default_where); 

      finalstr := 'where ORGANIZATION_CODE  = ' ||( ':FORECASTCONTROL.ORGANIZATION_CODE' ); 

      Set_block_property('BLOCKNAME', default_where, finalstr); 

      Execute_query(); 
    END IF; 

    IF :FORECASTCONTROL.fiscal_year IS NOT NULL THEN  --->Non-database block.item name
      Go_block('BLOCKNAME'); 

      dfinalstr := Get_block_property('BLOCKNAME', default_where); 

      finalstr := 'where FISCAL_YEAR  = ' ||( ':FORECASTCONTROL.ORGANIZATION_CODE' ); 

      Set_block_property('BLOCKNAME', default_where, finalstr); 

      Execute_query(); 
    END IF; 
END; 


Thank you



Re: Lov not work [message #602163 is a reply to message #602156] Sat, 30 November 2013 12:49 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Honestly, I got tired of asking the same question all over again, and not getting the answer. I quit.
Re: Lov not work [message #602221 is a reply to message #602163] Sun, 01 December 2013 17:27 Go to previous message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
is org_code set to be required by any chance?
Previous Topic: Data Not Showing
Next Topic: guessing arabic words
Goto Forum:
  


Current Time: Thu Apr 25 03:57:18 CDT 2024