If i enter something in FIND window, by clicking FIND button, it will populate data in MAIN window.I have below query in WHEN BUTTON PRESSED TRIGGER.
declare
cursor c1 is select empno, ename, job, sal from emp
where empno=nvl(:FIND.empno,empno)
and ename=nvl(:FIND.ename,ename)
begin
--here i am populating data into MAIN window block
end;
It's working fine.
REQUIREMENT: i want to pass where statement dynamically. Let us say if i pass only empno in FIND window, i want to pass 'WHERE empno=:FIND.empno' to existing select statement [I will keep select statement same without where condition]
If i pass empno and ename both, i want to pass 'WHERE empno=:FIND.empno and ename=:FIND.ename.
How to pass where condition to existing select statement based on parameters we pass in FIND window.
I am passing the column name for a rowtype dynamically and it is considered as a string by oracle and not giving the value of rowtype.column.i have ANONY 1 where i am passing value to attribute1 and ANONY 2 i am passing value as NULL.
IF l_comp_column IS NOT NULL AND l_mand_column = 'Y' THEN dbms_output.put_line(l_comp_column ||' IS NOT NULL');
l_flag := 'Y'; ELSIF l_comp_column IS NOT NULL AND l_mand_column = 'N' THEN l_flag := 'N'; END IF; [code]....
ID S_OWNER SOURCE_TABLE A_OWNER ARC_TABLE CONDITION_COLUMN PERIOD_VALUE PERIOD_UNIT
1 wedb Auction_table wedb Arc_Auction_tableAuction_date 15 Days 1 wedb Sales_table wedb ArcSales_table Sales_date 180 Days 1 hr Accounts_table hr Arc_Accounts_tableAccount_date 2 Years 2 concor Concur_table con Arc_Concur_table Last_update_date 4 Months
Like this 1000 entries are there in the control_table.
I want to pass all the columns from my control table dynamically.I am able to pass all the columns dynamically,except the PERIOD_VALUE.I have stucked up how to implement this condition.My aim is to get the data which is <= sysdate-PERIOD_VALUES based on PERIOD_UNIT.
For Example:
For Auction_date column I want to get the data which 15 days old. For Sales_date column I want to get the data which 180 days old. For Account_date column I want to get the data which 2 yers old. For Last_update_date column I want to get the data which 4 months old. [code]....
,I have a queryIn my query iam passing parameters using IN clause.The parameters contains in two tablesfor ex..select a.deptno, b.deptnofrom dept1 a, dept2 bwhere a.deptno = b.deptnoand NVL (a.deptno, b.deptno) in (10, 20, 30,.....) is this correct way to use NVL like this.i have a deptno consists in both the tables. How can i use this condition.
I am trying to pass null value '' in form but still failed
---SQL--- select distinct column1 from abc Y NULL two records found.
---FORM--- I have a list item name user_pick which is in two values SOUND-Y, DAMAGE-'' passing null value
--BUTTON-- select count(column1) into A from abc where column1=:user_pick;
when user pick from list SOUND it is ok..When user pick damage this will show 0 means null value are not passing correctly.i also tried in radio group,check box
i have list item populated with many table names from a schema. i have grid in oracle forms 10g and i want to fill the grid with at least four/more columns.I want to fire the list change trigger when each time any one table name is selected.
how can i find the columns names dynamically for filling the grid.
I've got a situation where I need to populate a list box of lab numbers when the user selects a matching date received date.
Right now it only works when the user presses enter on the field used to accept a date.
It also works when a user fills in date and then clicks twice on the listbox of lab numbers. (assuming there are some records for the date in question).
Both fields are in a data block that is not connected to a table. Here is the when-mouse-doubleclicked trigger
LAUNCH_CALENDAR('DISPLAY.DATE_BEAN'); IF :DISPLAY.DATE_RECEIVED IS NOT NULL THEN GO_ITEM('display.list_labno'); --POPULATE_LIST_ITEMS('date_received_records','display.list_labno'); do_key('list_values');
[Code]....
As you can see we have tried several different triggers to get this to work with a calendar date chooser (java bean). The bean works and allows for a date to be returned. However, it does not want to populate the listbox.
I need to pass two parameters (STUD_ID) and (TERM) from Form A to Form B. I've read a lot but I'm not familiar with terms and oracle jargon yet! So I really need your straight forward clarification
From the Calling form I'm using when_button_pressed trigger...what shall i write in here?! In the Called form, I'm declaring the following under (When_new_form-instance):
declare p1_id paramlist; stud_id number(8); term number(5);
begin
p1_id := get_parameter_list(stud_id); p1_id := get_parameter_list(term); :TEST_STUD_CRSE_REG.stud_id :=:parameter.stud_id; :TEST_STUD_CRSE_REG.term :=:parameter.term; next_block; end; ----------------- on the calling form:when_button_pressed I am using:
DECLARE
p1_id paramlist; stud_id number(8); term number(5);
I am working on forms 6i, ebs 11i and data base 9i. I have below requirement to achieve.
I want to create a lov for a column called 'FORM'.
I have lookup for this as follows
lookup code meaning description
FORM FORM XXSMCINV_FORM
in the description, it's value set name.
I am manually checking the value set name and writing static record group.
Right now, i have static record group for this like below.
select ffvv.flex_value "FORM" from fnd_flex_value_sets ffvs,fnd_flex_values_vl ffvv where ffvs.flex_value_set_id=ffvv.flex_value_set_id and ffvs.flex_value_set_name='XXSMCINV_FORM' order by flex_value;
It's working fine.
But in the lookup, they can add one more FORM like below.
LOOKUP_CODE MEANING DESCRIPTION
FORM FORM XXSMCINV_FORM FORM1 FORM1 XXSMCINV_FORM1
Now i have to change the record group query manullay like below.
select ffvv.flex_value "FORM" from fnd_flex_value_sets ffvs,fnd_flex_values_vl ffvv where ffvs.flex_value_set_id=ffvv.flex_value_set_id and ffvs.flex_value_set_name='XXSMCINV_FORM' order by flex_value; UNION select ffvv.flex_value "FORM" from fnd_flex_value_sets ffvs,fnd_flex_values_vl ffvv where ffvs.flex_value_set_id=ffvv.flex_value_set_id and ffvs.flex_value_set_name='XXSMCINV_FORM1' order by flex_value;
Is there anyway i can make this automatic whenever they add new FORM lookup.
Is this possible to achieve using dynamic record group.
how we can find file path dynamically. In paramenter we can give only destination file name like EXCEL.EXE. and its give me full path of EXCEL.EXE file.
How to pass a values from one to another, but without using parameters or globals. I've used parameters and every time i have to list the values of the form that values have been passed to, it ask do you want to save... even if I didn't passed any values. It's because my code in where-new-form instance, where i give values to a parameters.
can we pass parameter in a link. i.e when we open a new form clicking on the link, some values to be passed to the form so that new form get populated with that value.
I have a form in which the user selects values above from a LOV and then selects a run query button which then uses the values selected in the LOV to refine the query and output the appropriate values.
What i have done in the pre-query trigger is: (the block i am querying is called cars where the block i am selecting values from the LOV is called selection)
:cars.make := :selection.make; (repeated for other fields)
this worked fine untill i introduced a from and to date in my form in which i passed the data through to the query like this:
declare v_dates_between varchar2(1000); begin v_dates_between := 'reg_date between ''' || :selection.from_date || ''' and ''' || :selection.to_date; Set_Block_Property( 'cars', DEFAULT_WHERE, v_dates_between ) ;
Now i have added the above bit of code the from and to date work fine, but when a car make is selected it still bring back every car make and not just the one selected.
is it possibly because i am setting the where clause in the block property? perhaps i need to now incoperate my other selections into this where clause? are the two blocks exclusive to eachother? and if i put the whole code into the block property I assume i will get problems. E.G. the user leaves a selection criteria blank (if they want to query all car models they wouldnt select one from the list) i assume the query would only return back values which contain no car model which would be 0 records.
I have created a Data block - 'CONTACTS' (Database data block) and has database item - 'Code', 'Descr'
The number of records displayed is set to 5.
Value When checked - 'Y' Value When Unchecked - 'N' Check box mapping of other values - 'unchecked'
The requirement is when i check one or multiple checkboxes, i should pass the 'Code' item values to the WHERE clause.
Right now whenver i am trying to do so, only the current record value is copied to the WHERE clause.
I have tried using basic loop as well as while loop but things havmt worked. Below is a basic code which will work for one record, request to guide me with muliple checkbox ticked.
IF :contacts.cb = 'Y' THEN
IF p_where is null then
p_where := :contacts.code; else p_where := p_where ||','||:contacts.code; end if; end if; p_where:= 'where code in ('||p_where||')';
whether i create first a lov and record group at design time or not? if i create a lov and have the recordgroup column then what is the benefit of dynamically lov.?
Can i change the property of item dynamically in pl sql coding. Actually i want that whenever the user press some button then that field(textbox) become non-database item of the database block. put some value in it and press another button to restore its property like before.
i have a cursor which selects the codes based on the school records now i have a multi record block b1 the requirement is that if no of records selected in cusor is 10 then in block b1 10 records should be displayed and if it is 15 then 15 records should be displayed. Is there any way that i can set the no of records displayed in a block dynamically.The block b1 is non database block i am only using a create_record to populate the block.
I have a master-detail form showing multiple records (tabular) in data-block. Now my problem is, based on certain column's value of a particular item in a particular row on the data-block to ENABLE/DISABLE during run-time .
For example, in a detail-block of 5 rows, if 3rd row's 'detail-block.item1' is equal to lets say, "X", then 'detail-block.item2' of that particular row ONLY must be 'disabled'. otherwise, it must 'enable' the 'detail-block.item2' of that particular item in that particular row on the data-block.
Even when, I query the form, it must enable/disable that particular item of that particular row from the data-block based on item1's value.
Is there any way could alter the sequence depending on specific condition to start with 1 in the form builder?
i wanna to reset the sequence to 1 whenever the month change.is there any way?
Could i make detail block invisible and whenever button pressed i will display the block? I want to put the where clause for that block in the button and if the button did not pressed i want to display nothing in the detail block?