Assigning a value to an item
Hi,
I'm using forms6i.
I have an item in my form , say, Invoicebase, whose default value to be fetched from another table and to be shown in the form while loading.
The query to fetch the default value involves a where condition, like where company = :Global.company
But I'm assigining value to this global variable in when-new-form-instance.
So where(which trigger) should i write the query to fetch the default value?
I cannot assign value in when-new-record-instance trigger because , it wil change the form status, and if without entering any value i try to quit it wil ask for Close Form?
I can only do that in when-create-record trigger, but at that time the global variable wil not be initialized and the query would not have worked!
Please help me handle this
Thanks
Edited by: Divya on Jan 30, 2011 4:32 AM
Stay with the WHEn-CREATE-RECORD-trigger and put the code to initialize teh global into the PRE-FORM-trigger.
Similar Messages
-
How to assign NULL value to an ITEM in Forms Personalization?
Hi,
how to assign NULL value to an ITEM in Forms Personalization?
please suggest me.
ThanksI don't know what your form personalization does and maybe I misunderstand you ...
Try
:item_name := null; -
Assigning current value to Application Item
Hi,
I have a interactive report with form in my application.....
if a user applys filter on first column of the interactive report.....how can i assign that value to the APPLICATION ITEM.
thanksHi Andy,
Thanks....it is working perfect......
but i have a small issue....
in my real application i have 7tabs with page no's 1,2,3,4,5,6,and 15.....
so i have created 7 application items G_PARTNO1, G_PARTNO2, G_PARTNO3, G_PARTNO4, G_PARTNO5, G_PARTNO6, G_PARTNO15.
and used the single application process that runs On Load Before Header and uses the following PL/SQL code:
DECLARE
v1 NUMBER;
v2 NUMBER;
v3 NUMBER;
v4 NUMBER;
v5 NUMBER;
v6 NUMBER;
v15 NUMBER;
BEGIN
SELECT MIN(CONDITION_EXPRESSION) INTO v1
FROM IR_CONDITIONS
WHERE APPLICATION_ID = :APP_ID
AND PAGE_ID = 1
AND APPLICATION_USER = :APP_USER
AND CONDITION_COLUMN_NAME = 'PART_NUMBER'
AND CONDITION_ENABLED = 'Yes'
AND SESSION_ID = :SESSION
AND ROWNUM = 1;
SELECT MIN(CONDITION_EXPRESSION) INTO v2
FROM IR_CONDITIONS
WHERE APPLICATION_ID = :APP_ID
AND PAGE_ID = 2
AND APPLICATION_USER = :APP_USER
AND CONDITION_COLUMN_NAME = 'PART_NUMBER'
AND CONDITION_ENABLED = 'Yes'
AND SESSION_ID = :SESSION
AND ROWNUM = 1;
SELECT MIN(CONDITION_EXPRESSION) INTO v3
FROM IR_CONDITIONS
WHERE APPLICATION_ID = :APP_ID
AND PAGE_ID = 3
AND APPLICATION_USER = :APP_USER
AND CONDITION_COLUMN_NAME = 'PART_NUMBER'
AND CONDITION_ENABLED = 'Yes'
AND SESSION_ID = :SESSION
AND ROWNUM = 1;
SELECT MIN(CONDITION_EXPRESSION) INTO v4
FROM IR_CONDITIONS
WHERE APPLICATION_ID = :APP_ID
AND PAGE_ID = 4
AND APPLICATION_USER = :APP_USER
AND CONDITION_COLUMN_NAME = 'PART_NUMBER'
AND CONDITION_ENABLED = 'Yes'
AND SESSION_ID = :SESSION
AND ROWNUM = 1;
SELECT MIN(CONDITION_EXPRESSION) INTO v5
FROM IR_CONDITIONS
WHERE APPLICATION_ID = :APP_ID
AND PAGE_ID = 5
AND APPLICATION_USER = :APP_USER
AND CONDITION_COLUMN_NAME = 'PART_NUMBER'
AND CONDITION_ENABLED = 'Yes'
AND SESSION_ID = :SESSION
AND ROWNUM = 1;
SELECT MIN(CONDITION_EXPRESSION) INTO v6
FROM IR_CONDITIONS
WHERE APPLICATION_ID = :APP_ID
AND PAGE_ID = 6
AND APPLICATION_USER = :APP_USER
AND CONDITION_COLUMN_NAME = 'PART_NUMBER'
AND CONDITION_ENABLED = 'Yes'
AND SESSION_ID = :SESSION
AND ROWNUM = 1;
SELECT MIN(CONDITION_EXPRESSION) INTO v15
FROM IR_CONDITIONS
WHERE APPLICATION_ID = :APP_ID
AND PAGE_ID = 15
AND APPLICATION_USER = :APP_USER
AND CONDITION_COLUMN_NAME = 'PART_NUMBER'
AND CONDITION_ENABLED = 'Yes'
AND SESSION_ID = :SESSION
AND ROWNUM = 1;
IF (:G_PARTNO1 IS NULL AND v1 IS NOT NULL) OR (:G_PARTNO1 <> v1) THEN
APEX_UTIL.IR_RESET(2);
APEX_UTIL.IR_FILTER(2, 'PART_NUMBER', 'EQ', v1);
APEX_UTIL.IR_RESET(3);
APEX_UTIL.IR_FILTER(3, 'PART_NUMBER', 'EQ', v1);
APEX_UTIL.IR_RESET(4);
APEX_UTIL.IR_FILTER(4, 'PART_NUMBER', 'EQ', v1);
APEX_UTIL.IR_RESET(5);
APEX_UTIL.IR_FILTER(5, 'PART_NUMBER', 'EQ', v1);
APEX_UTIL.IR_RESET(6);
APEX_UTIL.IR_FILTER(6, 'PART_NUMBER', 'EQ', v1);
APEX_UTIL.IR_RESET(15);
APEX_UTIL.IR_FILTER(15, 'PART_NUMBER', 'EQ', v1);
:G_PARTNO1 := v1;
:G_PARTNO2 := v1;
:G_PARTNO3 := v1;
:G_PARTNO4 := v1;
:G_PARTNO5 := v1;
:G_PARTNO6 := v1;
:G_PARTN015 := v1;
ELSIF :G_PARTNO1 IS NOT NULL AND v1 IS NULL THEN
APEX_UTIL.IR_RESET(2);
APEX_UTIL.IR_RESET(3);
APEX_UTIL.IR_RESET(4);
APEX_UTIL.IR_RESET(5);
APEX_UTIL.IR_RESET(6);
APEX_UTIL.IR_RESET(15);
:G_PARTNO1 := NULL;
:G_PARTNO2 := NULL;
:G_PARTNO3 := NULL;
:G_PARTNO4 := NULL;
:G_PARTNO5 := NULL;
:G_PARTNO6 := NULL;
:G_PARTN015 := NULL;
ELSIF (:G_PARTNO2 IS NULL AND v2 IS NOT NULL) OR (:G_PARTNO2 <> v2) THEN
APEX_UTIL.IR_RESET(1);
APEX_UTIL.IR_FILTER(1, 'PART_NUMBER', 'EQ', v2);
APEX_UTIL.IR_RESET(3);
APEX_UTIL.IR_FILTER(3, 'PART_NUMBER', 'EQ', v2);
APEX_UTIL.IR_RESET(4);
APEX_UTIL.IR_FILTER(4, 'PART_NUMBER', 'EQ', v2);
APEX_UTIL.IR_RESET(5);
APEX_UTIL.IR_FILTER(5, 'PART_NUMBER', 'EQ', v2);
APEX_UTIL.IR_RESET(6);
APEX_UTIL.IR_FILTER(6, 'PART_NUMBER', 'EQ', v2);
APEX_UTIL.IR_RESET(15);
APEX_UTIL.IR_FILTER(15, 'PART_NUMBER', 'EQ', v2);
:G_PARTNO1 := v2;
:G_PARTNO2 := v2;
:G_PARTNO3 := v2;
:G_PARTNO4 := v2;
:G_PARTNO5 := v2;
:G_PARTNO6 := v2;
:G_PARTN015 := v2;
ELSIF :G_PARTNO2 IS NOT NULL AND v2 IS NULL THEN
APEX_UTIL.IR_RESET(1);
APEX_UTIL.IR_RESET(3);
APEX_UTIL.IR_RESET(4);
APEX_UTIL.IR_RESET(5);
APEX_UTIL.IR_RESET(6);
APEX_UTIL.IR_RESET(15);
:G_PARTNO1 := NULL;
:G_PARTNO2 := NULL;
:G_PARTNO3 := NULL;
:G_PARTNO4 := NULL;
:G_PARTNO5 := NULL;
:G_PARTNO6 := NULL;
:G_PARTN015 := NULL;
ELSIF (:G_PARTNO3 IS NULL AND v3 IS NOT NULL) OR (:G_PARTNO3 <> v3) THEN
APEX_UTIL.IR_RESET(1);
APEX_UTIL.IR_FILTER(1, 'PART_NUMBER', 'EQ', v3);
APEX_UTIL.IR_RESET(2);
APEX_UTIL.IR_FILTER(2, 'PART_NUMBER', 'EQ', v3);
APEX_UTIL.IR_RESET(4);
APEX_UTIL.IR_FILTER(4, 'PART_NUMBER', 'EQ', v3);
APEX_UTIL.IR_RESET(5);
APEX_UTIL.IR_FILTER(5, 'PART_NUMBER', 'EQ', v3);
APEX_UTIL.IR_RESET(6);
APEX_UTIL.IR_FILTER(6, 'PART_NUMBER', 'EQ', v3);
APEX_UTIL.IR_RESET(15);
APEX_UTIL.IR_FILTER(15, 'PART_NUMBER', 'EQ', v3);
:G_PARTNO1 := v3;
:G_PARTNO2 := v3;
:G_PARTNO3 := v3;
:G_PARTNO4 := v3;
:G_PARTNO5 := v3;
:G_PARTNO6 := v3;
:G_PARTN015 := v3;
ELSIF :G_PARTNO3 IS NOT NULL AND v3 IS NULL THEN
APEX_UTIL.IR_RESET(1);
APEX_UTIL.IR_RESET(2);
APEX_UTIL.IR_RESET(4);
APEX_UTIL.IR_RESET(5);
APEX_UTIL.IR_RESET(6);
APEX_UTIL.IR_RESET(15);
:G_PARTNO1 := NULL;
:G_PARTNO2 := NULL;
:G_PARTNO3 := NULL;
:G_PARTNO4 := NULL;
:G_PARTNO5 := NULL;
:G_PARTNO6 := NULL;
:G_PARTN015 := NULL;
ELSIF (:G_PARTNO4 IS NULL AND v4 IS NOT NULL) OR (:G_PARTNO4 <> v4) THEN
APEX_UTIL.IR_RESET(1);
APEX_UTIL.IR_FILTER(1, 'PART_NUMBER', 'EQ', v4);
APEX_UTIL.IR_RESET(2);
APEX_UTIL.IR_FILTER(2, 'PART_NUMBER', 'EQ', v4);
APEX_UTIL.IR_RESET(3);
APEX_UTIL.IR_FILTER(3, 'PART_NUMBER', 'EQ', v4);
APEX_UTIL.IR_RESET(5);
APEX_UTIL.IR_FILTER(5, 'PART_NUMBER', 'EQ', v4);
APEX_UTIL.IR_RESET(6);
APEX_UTIL.IR_FILTER(6, 'PART_NUMBER', 'EQ', v4);
APEX_UTIL.IR_RESET(15);
APEX_UTIL.IR_FILTER(15, 'PART_NUMBER', 'EQ', v4);
:G_PARTNO1 := v4;
:G_PARTNO2 := v4;
:G_PARTNO3 := v4;
:G_PARTNO4 := v4;
:G_PARTNO5 := v4;
:G_PARTNO6 := v4;
:G_PARTN015 := v4;
ELSIF :G_PARTNO4 IS NOT NULL AND v4 IS NULL THEN
APEX_UTIL.IR_RESET(1);
APEX_UTIL.IR_RESET(2);
APEX_UTIL.IR_RESET(3);
APEX_UTIL.IR_RESET(5);
APEX_UTIL.IR_RESET(6);
APEX_UTIL.IR_RESET(15);
:G_PARTNO1 := NULL;
:G_PARTNO2 := NULL;
:G_PARTNO3 := NULL;
:G_PARTNO4 := NULL;
:G_PARTNO5 := NULL;
:G_PARTNO6 := NULL;
:G_PARTN015 := NULL;
ELSIF (:G_PARTNO5 IS NULL AND v5 IS NOT NULL) OR (:G_PARTNO5 <> v5) THEN
APEX_UTIL.IR_RESET(1);
APEX_UTIL.IR_FILTER(1, 'PART_NUMBER', 'EQ', v5);
APEX_UTIL.IR_RESET(2);
APEX_UTIL.IR_FILTER(2, 'PART_NUMBER', 'EQ', v5);
APEX_UTIL.IR_RESET(3);
APEX_UTIL.IR_FILTER(3, 'PART_NUMBER', 'EQ', v5);
APEX_UTIL.IR_RESET(4);
APEX_UTIL.IR_FILTER(4, 'PART_NUMBER', 'EQ', v5);
APEX_UTIL.IR_RESET(6);
APEX_UTIL.IR_FILTER(6, 'PART_NUMBER', 'EQ', v5);
APEX_UTIL.IR_RESET(15);
APEX_UTIL.IR_FILTER(15, 'PART_NUMBER', 'EQ', v5);
:G_PARTNO1 := v5;
:G_PARTNO2 := v5;
:G_PARTNO3 := v5;
:G_PARTNO4 := v5;
:G_PARTNO5 := v5;
:G_PARTNO6 := v5;
:G_PARTN015 := v5;
ELSIF :G_PARTNO5 IS NOT NULL AND v5 IS NULL THEN
APEX_UTIL.IR_RESET(1);
APEX_UTIL.IR_RESET(2);
APEX_UTIL.IR_RESET(3);
APEX_UTIL.IR_RESET(4);
APEX_UTIL.IR_RESET(6);
APEX_UTIL.IR_RESET(15);
:G_PARTNO1 := NULL;
:G_PARTNO2 := NULL;
:G_PARTNO3 := NULL;
:G_PARTNO4 := NULL;
:G_PARTNO5 := NULL;
:G_PARTNO6 := NULL;
:G_PARTN015 := NULL;
ELSIF (:G_PARTNO6 IS NULL AND v6 IS NOT NULL) OR (:G_PARTNO6 <> v6) THEN
APEX_UTIL.IR_RESET(1);
APEX_UTIL.IR_FILTER(1, 'PART_NUMBER', 'EQ', v6);
APEX_UTIL.IR_RESET(2);
APEX_UTIL.IR_FILTER(2, 'PART_NUMBER', 'EQ', v6);
APEX_UTIL.IR_RESET(3);
APEX_UTIL.IR_FILTER(3, 'PART_NUMBER', 'EQ', v6);
APEX_UTIL.IR_RESET(5);
APEX_UTIL.IR_FILTER(5, 'PART_NUMBER', 'EQ', v6);
APEX_UTIL.IR_RESET(4);
APEX_UTIL.IR_FILTER(4, 'PART_NUMBER', 'EQ', v6);
APEX_UTIL.IR_RESET(15);
APEX_UTIL.IR_FILTER(15, 'PART_NUMBER', 'EQ', v6);
:G_PARTNO1 := v6;
:G_PARTNO2 := v6;
:G_PARTNO3 := v6;
:G_PARTNO4 := v6;
:G_PARTNO5 := v6;
:G_PARTNO6 := v6;
:G_PARTN015 := v6;
ELSIF :G_PARTNO6 IS NOT NULL AND v6 IS NULL THEN
APEX_UTIL.IR_RESET(1);
APEX_UTIL.IR_RESET(2);
APEX_UTIL.IR_RESET(3);
APEX_UTIL.IR_RESET(5);
APEX_UTIL.IR_RESET(4);
APEX_UTIL.IR_RESET(15);
:G_PARTNO1 := NULL;
:G_PARTNO2 := NULL;
:G_PARTNO3 := NULL;
:G_PARTNO4 := NULL;
:G_PARTNO5 := NULL;
:G_PARTNO6 := NULL;
:G_PARTN015 := NULL;
ELSIF (:G_PARTNO15 IS NULL AND v15 IS NOT NULL) OR (:G_PARTNO15 <> v15) THEN
APEX_UTIL.IR_RESET(1);
APEX_UTIL.IR_FILTER(1, 'PART_NUMBER', 'EQ', v15);
APEX_UTIL.IR_RESET(2);
APEX_UTIL.IR_FILTER(2, 'PART_NUMBER', 'EQ', v15);
APEX_UTIL.IR_RESET(3);
APEX_UTIL.IR_FILTER(3, 'PART_NUMBER', 'EQ', v15);
APEX_UTIL.IR_RESET(5);
APEX_UTIL.IR_FILTER(5, 'PART_NUMBER', 'EQ', v15);
APEX_UTIL.IR_RESET(6);
APEX_UTIL.IR_FILTER(6, 'PART_NUMBER', 'EQ', v15);
APEX_UTIL.IR_RESET(4);
APEX_UTIL.IR_FILTER(4, 'PART_NUMBER', 'EQ', v15);
:G_PARTNO1 := v15;
:G_PARTNO2 := v15;
:G_PARTNO3 := v15;
:G_PARTNO4 := v15;
:G_PARTNO5 := v15;
:G_PARTNO6 := v15;
:G_PARTN015 := v15;
ELSIF :G_PARTNO15 IS NOT NULL AND v15 IS NULL THEN
APEX_UTIL.IR_RESET(1);
APEX_UTIL.IR_RESET(2);
APEX_UTIL.IR_RESET(3);
APEX_UTIL.IR_RESET(5);
APEX_UTIL.IR_RESET(6);
APEX_UTIL.IR_RESET(4);
:G_PARTNO1 := NULL;
:G_PARTNO2 := NULL;
:G_PARTNO3 := NULL;
:G_PARTNO4 := NULL;
:G_PARTNO5 := NULL;
:G_PARTNO6 := NULL;
:G_PARTN015 := NULL;
END IF;
END;
The process is conditional on "Current Page is Contained Within Expression 1 (comma delimited list of pages) and Expression 1 is: 1:2:3:4:5:6:15
I am getting the following error when i run the application:
Unexpected error, unable to find item name at application or page level.
Error ERR-1002 Unable to find item ID for item "G_PARTN015" in application "181".
OK
Please let me know where i am doing wrong....
Thanks -
Bring 2 datas at the same time and assign that value to my item
Hi everybody, I have a trigger called WHEN-NEW-FORM-INSTANCE where I have the following select: Select to_char(sysdate,'yy') into :mat from dual.
This select brings me the year from the system, but I would like to put together the year and the consecutive number of another table to have something like this: 09-0001 and add this value to the item called :mat.
Is this possible?You can try what Brown has suggested.
But in case you want a running number , then sequence might not help.
What we used to do in this case is, we used to store a number in one seperate table (with other parameters like year, item code and so on), and select the max of this number +1 concatinated with year or whatever format you require.
And at the end update that number with number+1.
Say table series has columns
year month series
09 01 22
Now when you select this number series+1 and update in you empid prefixed/suficed with some other field, then do remember to update this field. That means at the end of the transaction the record in this table would be
09 01 23.
This is a unique idea and can be utilized for generating ID based on year month series format.
Just define them in the table and use them accordingly in your code. -
Is there a way to assign value to variable
of data type ITEM? In other words, I need to
assign value to an item, where I just know the
it_id.
In the following procedure p_item is unknown until runtime;
and if it_id is not null then assign some value to the item.
procedure update_item(p_item)
is
it_id item := find_item('block1.'||p_item);
if not id_null(it_id) then
it_id := 'some_value'; --doesn't work.
end if;
end;Do you mean you know the name of the item and you want to then assign a value?
If so then use the COPY command which allows you to assign a value to a named variable
e.g.
COPY (12345, 'blocka.number_item1');
To read the value in the same way use the NAME_IN function.
There is plenty in the forms helps about this.
Mark -
How i can assign multiple values to tabuler text item (Help)
HI
IM PROGRAMMING ONE FORM AND I PUT THERE TABULER TEXT ITEM
I WANT ASSIGN 63 VALUES TO THIS TEXT ITEM ONE BY ONE BY CODE I MEAN PUT FIRST VALUE IN THE FIRST TEXT ITEM ROW THEN SECOND TO THE SECOND TEXT ITEM AND LIKE THIS UNTIL I REACH TO THE LAST
I MAKE LOV PUT I CAN ASSIGN ONE VALUE BY ONE VALUE EACH TIME DOUBLE CLICK ON THE TEXT ITEM ASSIGN ONE VALUE THEN DOUBLE CLICK ON THE SECOND ROW PUT MY BOSS WANT ASSIGN ALL VALUES 63 FROM ONE CLICK ON BUTTONThen you will have to create a when-validate-item trigger with a cursor based on your selection of your LOV . Loop through that cursor assigning the next in the next record by using the built-in function next_record. (put you selection for you value in a hidden item for example.
something like this:
Declare
cursor c is
select returnValueFromLOV
from <yourtable>
where yourdisplay value = :hidden_tem;
begin
for r in c loop
next_record;
item := r. returnValueFromLOV;
end loop;
exception
when no_data_found
your error handling;
end;
Hope it put you on the road to reach what you want
Erwin -
Assigning Selected Tree Node Value To An Item
Hi guys,
I want to assign selected tree node's value to a page item. This item can be a textbox or a label (display only). How can i do that? I tried to use "Selected Node Page Item" property which is available on Tree Attributes. But I couldn't assign the value without refreshing whole page.
Do you have any idea?
Thanks.Hi ,
Thank you that was exactly what I was looking for. I couldn't find how to pass database column to javascript as an input parameter. So thanks for your help. I made a couple of correction :
1) I put additional ' characters to ('''||"NAME"||''') this part because my field is varchar.
select case when connect_by_isleaf = 1 then 0
when level = 1 then 1
else -1
end as status,
level,
NAME as title,
null as icon,
"ID" as value,
null as tooltip,
'javascript:setFObjName('''||"NAME"||''')' As link
from "#OWNER#"."TABLE_NAME"
start with "PID" is null
connect by prior "ID" = "PID"
2) In script I have added ' character before and after page item.
function setFObjName(pobjName){
$s('P1_OBJ_NAME', pobjName);
So it works. Thanks tfor your help. -
Before Header pl/sql process to assign values to page items
How can i assign values to items on a page based on the data structure returned from a pl/sql procedure within the before header process? I am thinking of executing a pl/sql procedure based on a URL parameter value and then assign values to page items. Is this really possible using Apex 4.0.2? If yes, how can it be done?
thanks
SeetharamanThe question isn't really clear. What kind of "data structure returned from a pl/sql procedure"? Please be much more specific.
For a PL/SQL data structure such as record containing 2 elements (<tt>x</tt> and <tt>y</tt>) returned as an out parameter from a procedure to be assigned to 2 page items <tt>p1_x</tt> and <tt>p1_y</tt>, all that's required in the Before Header process is something like
declare
l_rec rec_type;
begin
the_proc(..., p_out => l_rec, ...);
:p1_x := l_rec.x;
:p1_y := l_rec.y;
end; -
Assign values for Application items
Hi,
I have some application items to which I want to assign values querying from a database table based on the user logged in. I have created an application process which does that. What process point I need to select so that the values in application items are available through out the session?
Thanks,
AshaAsha:
I have been able to reproduce this issue. The application process appears to fire for every 'new' session-id. This explains the 'no data found' when you navigate to the application's login page. What is weirder is that APEX re-uses the session-id created when presenting the login page and therefore the application process no longer fires ! This needs more research. Clearly, my understanding of the the 'On New Session - After Authentication' is inadequate.
In the meanwhile you can move the code you have for the application process and and use it as a 'Post-Authentication Process' for the application's authentication scheme.
Varad -
How to assign the Value to the Particular field-Text field
Hi all,
My requirement is to call the Web service with input from the ADF page.
Steps I have done:
1. I have created a Web service data control based on the WSDL file.
2. Just drag and drop the Process, It is automatically created the form with the Input fields and then the Process button
3. When I entered the values and then process button it will pass the values corretly.the web service is invoked correctly with the values entered.
4. But when I try to assign the value from the some other field that is not working.
I am assigning the Value to the field by go to the properties of the Particular field value =”CREATE”
When I do like this that value is showing in the screen. But it will not pass the value to the web service.
I think the value is only displaying in the screen. Not stored at bindings level. Kindly guide me in this.
Thanks in Advance
C.KarukkuvelIf you want to have the value that is returned displayed in a field that has binding to another item and not the WS result item then the way to do this would be to override the method that is invoked with the button that calls the web service - you then take the result and assign it to the item you want.
See the way it is done here:
http://blogs.oracle.com/shay/2009/07/java_class_data_control_and_ad.html
While this sample uses a simple method it would be basically the same for a Web service. -
Assigning multiple values from a List of Values at detail (table) level
Hi,
I have a master detail entry screen. I want to assign multiple values when end user selects an item from the list. The field is at detail level (Table type). I can do it using the "Select one choice" type component (ADF Faces Core) but it doesnt retain the value when I go to the next record. This type of component works fine with the screen with only one record to show (form type). This component has binding with list type.
If I use simple list with Table binding, I can not assign values to multiple items. This type of list retains value when record is changed.
Can anyone help me resolving this issue?
Thanks,
CAHPost on Jdev forum JDeveloper and OC4J 11g Technology Preview
--Shiv -
Assigning a value to a number field through a button
11gxe , apex 4.x ,
hi all ,
i am trying to assign value to a number field through a button ,
i created a button , then a dynamic action for this button , when it is clicked ,
the dynamic action is based on Pl\Sql code , and the code is
begin
:p2_assign := 455 ; -- where the page is "p2" and the number field is "assign"
end ;
but it does not work , why ?I can see the toolbar now from the last link you provided me with ,
but you showed me the way to use the static assigning , and assigning with sql , and i want to do it with "Pl\Sql"
in order to know why my way of writing the code does not work , although it is written properly , and should work .
every input item is a variable , and i am doing so
begin
:p2_assign := 455 ; -- where the page is "p2" and the number field is "assign"
end ;
to assign a value to a variable ,
and
doing this
begin
select 455 into :p2_no from dual ;
end ;
to select a value into a variable , then
why does not it work ??
and how to do it with pl\sql ?
thanks -
The value of data_block item can be stored in a variable?
Hi all I have master and detail form
i need to insert data by scanning the barcode
and i need to select a form_item dynamically please guide how
problum desc:-
My Table desc is like this
SQL> desc gin_detail1;
Name Null? Type
ID NUMBER
SALE_ORDER_ID VARCHAR2(150)
PROD_ID VARCHAR2(20)
PROD_NAME VARCHAR2(100)
COLOR VARCHAR2(20)
XS NUMBER
S NUMBER
M NUMBER
L NUMBER
XL NUMBER
PCS NUMBER
IF :gin_detail1.barcode = a THEN
SELECT SALE_ORDER_NO,prod_id,style,color,1 INTO
:gin_detail1.sale_order_id,:gin_detail1.prod_id,
:gin_detail1.prod_name,:gin_detail1.color,:gin_detail1.XS from sale_order_barcode1 where barcode=:gin_detail1.barcode;
end if;i need to change the :gin_detail1.xs dynamically as per barcode
If BARCODE is 241040713BLACKS then :gin_detail1.XS
if BARCODE is 241040597BLACKL then :gin_detail1.L
like these for all the fields
Please Guide
Thanks ANd Regards
VikasHi Vikas
i need to select a form_item dynamically u can't
But u can only assign the value of a form item into a variable then do what ever u want with it...
if i do recognize ur problem right then use the following..
> v_value := :form_item;
what error r u getting from the following select statment ?
the assign statment should equal the number of the variables or menu items ur trying to assign & MATCH IT as follows
IF :gin_detail1.barcode = a THEN
SELECT SALE_ORDER_NO ,prod_id, style, color, XS
INTO :gin_detail1.sale_order_id, :gin_detail1.prod_id, :gin_detail1.prod_name, :gin_detail1.color, :gin_detail1.XS
FROM sale_order_barcode1 where barcode=:gin_detail1.barcode;
END IF ;so u missed
XS into :XS besides why u select the value 1 & insert it into :XS ?
XS
need to change the :gin_detail1.xs dynamically as per barcode
If BARCODE is 241040713BLACKS then :gin_detail1.XS
if BARCODE is 241040597BLACKL then :gin_detail1.L
like these for all the fields
DECLARE
v_result1 NUMBER ;
v_result2 NUMBER ;
BEGIN
If :gin_detail1.BARCODE = 241040713BLACKS THEN
v_result1 := :gin_detail1.XS ;
elsif :gin_detail1.BARCODE is 241040597BLACKL THEN
v_result2 := :gin_detail1.L;
and so on...
END;
Note : u have 2 compare & assign in the if statment within the same datatype otherwise u have to use to_char() or whatever...
Hope i could get ur point & could my answer help u ...
otherwise pls send the error u r getting and re-state the problem u mean exactly.
Regards,
Abdetu...
Edited by: Abdetu on Jan 17, 2011 5:13 AM -
How to populate the value of SHUTTLE item from MULTISELECT item
Hi,
I am have following 2 items
P1_TEXT1 - multiselect
P1_TEXT2 - shuttle
I have populated the value of P1_TEXT1(multiselect) and then want to assign the same value to P1_TEXT12 (shuttle)
I am using following Javascript function to assign the value of P1_TEXT1 to P1_TEXT2 but it's not working??
$x('P1_TEXT2').value = $x('P1_TEXT1').valuethanks,
Deepak
Edited by: Deepak_J on Dec 4, 2009 3:28 PMHi Jari,
I modified the earlier script as shown below. It's working perfectly fine as per my requirement.
Pl let me know if these changes are fine OR is there is any modification we need.
<script>
var ob = $x('P1_TEXT1');
var ob2 = $x('P1_TEXT2_LEFT');
var ob3 = $x('P1_TEXT2_RIGHT');
// added this piece as per your suggestion..
var g_myShuttle = null;
if(!flowSelectArray){
var flowSelectArray = [];
flowSelectArray[flowSelectArray.length] = "P1_TEXT2_RIGHT";
g_myShuttle = new dhtml_ShuttleObject
("P132_HDWR_DEVCE_ID_LEFT","P1_TEXT2_RIGHT");
// Remove all values
g_myShuttle.remove_all();
// added this FOR LOOP, which will make every thing on the LEFT side unselected initially
for (var j = 0; j < ob2.options.length; j++)
ob2.options[j].selected = false;
for (var i = 0; i < ob.options.length; i++)
for (var j = 0; j < ob2.options.length; j++)
if(ob2.options[j].value == ob.options.value)
ob2.options[j].selected = true;
var g_myShuttle = null;
if(!flowSelectArray){
var flowSelectArray = [];
flowSelectArray[flowSelectArray.length] = "P1_TEXT2_RIGHT";
g_myShuttle = new dhtml_ShuttleObject
("P1_TEXT2_LEFT","P1_TEXT2_RIGHT");
g_myShuttle.move();
</script>
Thanks,
Deepak -
How to set the value of application item using pl/sql in application process
Hi guys,
I want a global variable (application item) whose value will be set at the start when a user logs in to the application. The value will be retrieved from database using a sql query. I do not know the exact syntax to set the value of application item in application process. Also i want to know in which type of application process should i use to set the value of application item when a user starts a session. The value of application item varies from user to user.
Please help.
I am using apex 4.2
Regards,
WaqasYou can use the application item as bind-variable with its name. ie. your application item is named G_MY_APPLICATION_ITEM, then you can access/set it using :G_MY_APPLICATION_ITEM.
For example
BEGIN
-- assign like a variable
:G_MY_APPLICATION_ITEM := 'LARRY';
-- use in a SQL statement
SELECT WHATEVER_COLUMN
INTO :G_MY_APPLICATION_ITEM
FROM MY_TABLE
WHERE USERNAME = :APP_USER
END;
Peter
Maybe you are looking for
-
Does the iPad 3 gen, have a voice recorder?
Does the iPad 3rd gen with retina display, have a voice recorder?
-
New computer purchase hinges on use of XP on Mac
I'm in the market for a new laptop, preferably a Mac that will run XP (and potentially Vista in the near future?). My specific need is to be able to occassionally run Windows XP, make a wireless Internet connection (WEP password entry may be required
-
Upload image,file(zip,txt,word,excel...)
how to upload image or file(zip,txt,word,excel,ppt and so on) to database,then show it by jsp page? Someone can give me a sample?
-
I upgraded my operating system when prompted a couple of days ago. I am not frequent user of the phone and use it only for Music, Emails and Facebook. Yesterday at the pub I noticed that I was unable to obtain a wireless connection to the pubs broadb
-
I was watching the webcast of ODP. The instructor does a .NET stored procedure demo and creates a new C# project and selects an Oracle Project template. I have ODP 10.1.0.4 installed and followed the webcast but when I create a new project and try to