Select the value of the text element based on the selection list
HelloI have a selection list that displays a number of codes of a table, and I want to display the description of the code (from the same table) in a field of text next to it.
The selection list works good based on an LOV, but I can't seem to find how to get the return value, so I can identify the correct description of the table to be displayed.
Thank you
See this link: http://htmldb.oracle.com/pls/otn/f?p=31517:80:6340934958598741:NO
It will have a lov that calls an application process that fills a text box...
Thank you
Tony Miller
Webster, TX
Tags: Database
Similar Questions
-
assign a value to a text element using the PL/SQL function body
Hello
I want to assign a value to a text element using PL/SQL function body option in the Source elements. But the below error when I try to apply it.
Source code:
declare
name varchar2 (100);
Start
If v ("P3_CREHIDD") = 'Edit' then
Select ename in the name of cpy_emp where empno = v('P3_EMPNO2');
end if;
end;
ERR-1904 unable to calculate the default item: type = computation_type = function body declare name varchar2 (100); so start v ('P3_CREHIDD') = 'Edit' and then select ename in the name of cpy_emp where empno = v('P3_EMPNO2'); end if; end;.
Thank you
David.Hello
Your body of the function doesn't return anything.
Maybe it worksdeclare l_name varchar2(100); begin if v('P3_CREHIDD') = 'Edit' then select ename into l_name from cpy_emp where empno = v('P3_EMPNO2'); end if; RETURN l_name; end;
BR, Jari
-
Toggling text element based on the selection of a list item
Hello friends,
I have a header data block where I have a field to not enter the name of book and a REGD Item list that displays 'Yes' and ' ' and a text REG_NO element.
When the user selects 'Yes', the text REG_NO element must be enabled so that the user can enter the number of the book.
By choosing 'No', the REG_NO element must be disabled.
I have included a trigger WHEN-LIST-CHANGED in the list REGD item.
I added the following code in the trigger above:
--=======================================
BEGIN
IF: HEADER. REGD = ' don't
THEN
SET_ITEM_PROPERTY('HEADER.) REG_NO', ENABLED, PROPERTY_FALSE);
ON THE OTHER
SET_ITEM_PROPERTY('HEADER.) REG_NO', ENABLED, PROPERTY_TRUE);
END IF;
END;
--=======================================
However, when the form is opened, the text REG_NO element is enabled.
When the user chooses the 'no' in the list item REGD, then the text REG_NO element is disabled as expected.
However, when you choose 'Yes' in the item list REGD, the text REG_NO element does not get activated.
Can someone let me know how to activate the text element.
Concerning
Hawker
When you disable an item, NAVIGALE, INSERT_ALLOWED, and UPDATE_ALLOWED properties are also set to False, then you will need to reactivate their when you reactivate an item.
-
How to get the control to one of the text element?
Dear people,
I have two items of text to say TEXT_ITEM5 and TEXT_ITEM6.both values entered in the text elements must be equal.else that an error message should be displayed and two items of text should be cleared.so that I wrote the following code in WHEN BUTTON the shutter as.
Its almost works well, but after having erased the text in the two elements of the control text should go back to TEXT_ITEM5. I even tried GO_ITEM but is not working properly.pls help me with suggestions.If :block3.text_item5 <> :block3.text_item6 then c:=show_alert('ALERT21'); :block3.text_item6:=null; :block3.text_item5:=null; raise form_trigger_failure; end if;
Regarding
VidsHello
If the value of two text element should be equal so why give the possibility to enter 2 text boxes? Enter 1 text and WHEN-VALIDATE-ITEM trigger of this element, assign the value to the other text element. And if you still need the old way, then you must write the GO_ITEM integrated before the RAISE FORM_TRIGGER_FAILURE statement.
IF :BLOCK3.TEXT_ITEM5 != :BLOCK3.TEXT_ITEM6 THEN C := SHOW_ALERT('ALERT21'); :BLOCK3.TEXT_ITEM6 := NULL; :BLOCK3.TEXT_ITEM5 := NULL; GO_ITEM('BLOCK3.TEXT_ITEM5'); RAISE FORM_TRIGGER_FAILURE; end if;
Kind regards
Manu.
-
How to initiate submit when a text element changes?
Hello
I would like to make a submit event when the end user copying certain values in a text element. Is this possible?
TIA, TamasHi Tamas,
You can do this by using a little javascript.
Add onchange = "javascript:doSubmit('SUBMIT'); " to your question in the section"attributes of items item => HTML Form.
In Apex 4.x, you must instead use: onchange = "javascript:apex.submit ('SUBMIT'); " or - even better - to configure a dynamic action!
Kind regards
Jens -
TEXT ELEMENT THAT RECEIVES the VALUE OF LIST (ajax) SELECT
I HAVE A LIST OF SELECTION WHO HAVE:
In P2012_CLIENTE HTML_FORM_ATTRIBUTES:
OnChange = "get_select_list_ajax(This,'P2012_REQUERENTE','COMBO_REQUERENTE_ITEM','COMBO_REQUERENTE_AJAX'); "class ="largura200";"javascript:pegaIDCLIENTE (this);""
I PUT "javascript:pegaIDCLIENTE (this);"-> TO CALL THIS FUNCTION:
function pegaIDCLIENTE (filter)
{
get var = new htmldb_Get (null, $v ('pFlowId'), 'APPLICATION_PROCESS is COMBO_OP_CLIENTE', 0);
Get.Add ('P2012_CLIENTE', filter.value);
var ret = get.get ();
If (ret)
{
var d = document.getElementById ('P2012_ID_CLIENTE');
d.innerHTML = ret;
}
get = null;
}
THIS FUNCTION CALLS APPL COMBO_OP_CLIENTE PROCESS:
DECLARE
vidCliente NUMBER;
BEGIN
SELECT id_cliente INTO vidCliente FROM vw_cadastro_operador WHERE id_cliente =: P2012_CLIENTE;
HTP.p (vidCliente);
EXCEPTION WHEN OTHERS THEN
HTP.p (not found customer!');
END;
but still, WHEM I RUN MY PAGE, on the evolution of the selection list, ELEMENT of TEXT 'P2012_ID_CLIENTE' is null...
What wrong? Can you help me?
Thank youHello
I have error on the application process
Try this
DECLARE vidCliente VARCHAR2(32000); BEGIN SELECT id_cliente INTO vidCliente FROM vw_cadastro_operador WHERE id_cliente = :P2012_CLIENTE; htp.p(vidCliente); EXCEPTION WHEN OTHERS THEN htp.p('no client found!'); END;
But it's strange if popup show & P2012_CLIENTE. When you have below javascript.
It tells me that you don't have a component called P2012_CLIENTE. I may be wrong
Popup should show the value of the P2012_CLIENTE elementfunction pegaIDCLIENTE(filter) { alert('&P2012_CLIENTE.'); var get = new htmldb_Get(null,$v('pFlowId'), 'APPLICATION_PROCESS=COMBO_OP_CLIENTE',0); get.add('P2012_CLIENTE', filter.value); var ret = get.get(); if(ret) { $x_Value('P2012_ID_CLIENTE', ret); get = null; } get = null; }
-
change the field type selection list of text based on the data in the other domain.
Hello
We have a requirement where we are looking to display the page as element select list or a free text field based on the value of the item to another page.
Say, we have two fields
Day:
Products:
If day = 'Monday' produced a drop in low field of another product would be a free text field. Is this possible in APEX?
This is the configuration I did.
I used the field produced twice (as a text and list field select) as an element of a page., dependent on the value of the day I used the dynamic properties of actions to show/hide these fields.
However, when I click on submit, it throws an error:
ORA-06550: line 1, column 108: PL/SQL: ORA-00957: name of column in double ORA-06550: line 1, column 13: PL/SQL: statement ignored
Kind regards
Satya
You can have both share the same database column, the process of the APEX DML does not know how to consolidate.
You will need to add a calculation and determine the real value based on two fields, up to an only one mapped to db.
-
My requirement is
If we click on the POP UP dot LOV button then I want the dependent value of this item in column of the text element in a table.
How do I get this as a table?
Hi Dan,.
I have a table, in the first column is popup LOV.and second column key is text element.
So my question is if we click contextual key lov and select employee name, then I want to show the email address of this employee in the second column of tabular presentation.
This can be done with AJAX. Write a JavaScript function on the onchange event of popup LOV item (Employee) key and pass the number of the employee selected to your AJAX call, go get the employee email and assign it to your entry corresponding to the key LOV popup text has changed.
As your dealing with Form (Wizard Based/APEX_ITEM Based-not specified) in a table, you take insofar as each column is the table of elements mapped to APEX_APPLICATION input. G_FXX tables and therefore to write JavaScript to locate the item to update.
I hope this helps!
Kind regards
Kiran
-
The text element values value when the user clicks a report line.
The text element values value when the user clicks a report line.
I have a report based on the EMP table and two elements P911_EMPNO, P911_DEPTNO. When I click on one of the lines the EMPNO and DEPTNO is copied to the text elements.
It works fine if I leave the EMPNO and DEPTNO as SHOW report, but if I then these clear values are not retrieved the report form (my javascript is very limited).
I need a method to retrieve the data hidden in the report and display in the text without the reposting of the page elements.
Also, would be nice if the line was highlighted until another line is clicked but especially is my priority.
Elements
P911_EMPNO, P911_DEPTNO (field of disabled text, saves the State)
Report
Select * from emp using the model of report below.
Custom model.
standard_report_cust_P330-a copy of the standard report with a change model.
BEFORE EACH LINE
< tr onclick = "selectRow (this);" #HIGHLIGHT_ROW # >
* Javascript in the Page Header.*
< script language = "JavaScript1.1" type = "text/javascript" >
function selectRow (p_tr)
{
var l_deptno = p_tr.childNodes [8] .innerHTML;
var l_empno = p_tr.childNodes [1] .innerHTML;
html_GetElement ('P911_DEPTNO'). Value = l_deptno;
html_GetElement ('P911_EMPNO'). Value = l_empno;
}
< /script >
If anyone has any ideas. Thanks, PeteHello
When you use this type of report model, you actually control on where the column values are used - and they can be used several times.
For example, a setting of 'Model line 1' for one such model could be:
<tr> <td class="c1">#1#</td> <td class="c2">#2#</td> <td class="c2">#3#</td> <td class="c2">#4#</td> <td class="c3">#5#</td> </tr>
#1 # fact refers to the data in the first column, #2 # for the second and so on. So you can do:
<tr onclick="javascript:dosomething('#1#','#2#');"> <td class="c1">#1#</td> <td class="c2">#2#</td> <td class="c2">#3#</td> <td class="c3">#5#</td> </tr>
For example, by clicking on the line would trigger the dosomething() function and pass in that the values of the first and second columns. Also note that the 4 # does not appear now - this column is 'hidden' (but note that you must check the box to show the column)
Andy
-
How to extract values of classic report column in the text element
Hi all
I've created a classic report (select id, name,' < input type = "button" value = "add" id = "add" name = "add" > "as" add details "details ;) with a single column as column values want link.i in the text element when I click on the link of that particular record of the report)
(1) in the link this link column property I've specified the URL as [javascript:insert_in_table(#ID#,#NAME#)]
(2) text two article P_ID, P_NAME
(3) in the header of the page, I've specified as javascript
< script type = "text/javascript" >
function insert_in_table (id, name) {}
var regId = ' #detail #'.substr (1);
var req = new htmldb_Get (not null, $v ('pFlowId'), 'APPLICATION_PROCESS = add', $v('pFlowStepId'));
Req.Add ('P_ID', ID);
Req.Add ('P_NAME', Name);
forced. GetAsync (function () {}
If {(p.readyState is 4)
$a_report (regId);
}
});
}
< /script >
(4) created a (add) process whose point: on demand, run this process when requested by ajax
pl/sql: insert into name_detail (id, name) values (: P_ID,: P_NAME)
now the problem is I m not getting the values of column in the report in the text element, it only shows white.
Kind regards
Ketan
Hello Ketan,
Assuming that you want to insert the values into the table, this is why you want to set values for the element,
If this is the case, then no need to define values for the element to insert.
Follow the steps below, it is one of the embodiment of your condition.
Step 1: Put the code below in your classic report query
assuming that the id is of type number and the name is of type varchar, that's why I am attaching the name to apostrophe, see line 3
select id , name , '' as "Add to detail" from detail
Edit 'Add details' column-> column attributes-> view-> column of Standard report
Step 2: Create a process in the processing of the Page
Name: INSERT_DATA
Address the point: on demand, run this process when requested by ajax
Process: putting the code below
Declare P_ID number ; P_NAME varchar2(50); Begin P_ID := apex_application.g_x01; P_NAME := apex_application.g_x02; insert into name_detail(id,name) values (P_ID,P_NAME); End;
Step 3: Create a java script function to call your insert ajax process.
Change the Page-> the function and the global variable declaration-> put the code below
function insert_in_table(id,name) { apex.server.process ( "INSERT_DATA", { x01: id,x02: name }, { success: function( pData ) { } }); }
Hope this helps you,
Kind regards
Jitendra
-
Can not set a value by the executed dynamic action on the page element "selection list."
I created an agenda of the page 'list of selection' and I want to when I change a value in another element of the page set only 'screen '.
I created a dynamic action on the page element "selection list" for this.
These are the dynamic action attribute:
When:
======
Event: change
Selection type: point
Article: P29_PURCHASE_ORDER
Condition: No strings attached
Advanced:
========
Scope of the event: static
Identification:
==========
Action: Set
The ' Action Page when the changed value "attribute of the element of 'list of selection' = 'None', and when I run form the dynamic action run and set the value for once and do not update the value according to the change in the article"list of selection. "
Note: when I change the previous attribute of 'Redirect and set', dynamic action run and properly value, but the value was hidden soon
I want to value when the value of change of select list according to this change successfully.
Please, advice me,
Best regards
Mustafa Ezzat
Hello
you set the value of the 'Page elements to submit' to P29_PURCHASE_ORDER?
Then, the SQL statement would use the current selected value.
This is the help text says: "specify a list separated by commas of the elements of the page that will be submitted to the server and therefore available for use in your"SQL statement"," PL/SQL Expression"or"Body of the PL/SQL function".»
Kind regards
Erik-jan
-
Javascript-based dynamic action and display the value of (!) from the selection list
Hello
I'm not a jQuery guru (yet).
Can someone show me how to turn on or off an ITEM on a form based on the value display of a selection list (usually I have dynamic lists, so I don't 'know' even internal values)
I created a simple demo in which you can (if you want to) show me how it works.
Workspace: 6POOLRULES
User: demo01
Password: demo
Application: 30851 (Drone)
The idea is to
* Disable/hide the "Id other Description" If the ' Id Type (display value!) is 'Passport' or 'license '.
* activate/display the Description of the 'other' Id if the ' Id Type (display value!) is "other".
I think that it should be dynamic action based on javascript/jQuery. But what would this jQuery selector should look like?
Published by: bveoracle on March 29, 2012 07:28
Published by: bveoracle on March 29, 2012 07:30Hello
OK, I changed the dynamic action to use Jquery and get text from the value. The only thing I changed is in the section WHEN.
Enjoy.
-
Fill in the text field of the value of select list using javascript
Hello
I'm editing a form where a text field is to be filled using an On-Demand application process. The process is called with an OnChange.
Application process:
In the attributes of HTML Form selection list element:declare l_CCSS_STATUS varchar2(100); begin select CCSS_STATUS into l_CCSS_STATUS from PATIENT where ID = :P11_PATIENT_ID; htp.prn(l_CCSS_STATUS); EXCEPTION WHEN NO_DATA_FOUND THEN l_CCSS_STATUS := 'Inactive'; htp.prn(l_CCSS_STATUS); end;
onChange = "javascript:f_getStatus()"; "
It fills a text field (: P11_CCSS_STATUS) when I appreciate is selected in the select list.
I am filling a second field (: P11_COPY) with a (share) value for the same table of PATIENTS, but don't really understand how the: P11_CCSS_STATUS field is filled in from the application process.
If I understand the request of the share in the application process, then it is appended to the value CCSS_STATUS and appears in the: P11_CCSS_STATUS text element.
Any help is appreciated.
Thank you
MattHello
visit the similar to the below application process
declare l_CCSS_STATUS varchar2(100); l_COPAY varchar2(100) begin select CCSS_STATUS , COPAY into l_CCSS_STATUS , l_COPAY from PATIENT where ID = :P11_PATIENT_ID; //notice this line.... how the response is send htp.prn(l_CCSS_STATUS || ',' || l_COPAY); EXCEPTION WHEN NO_DATA_FOUND THEN l_CCSS_STATUS := 'Inactive'; htp.prn(l_CCSS_STATUS); end;
and javascript call you to something similar to below.
function myAjaxCall() { var ajaxRequest = new htmldb_Get( null , &APP_ID. , 'APPLICATION_PROCESS=myAppProcess',0); ajaxRequest.add('P11_PATIENT_ID' , $v('P11_PATIENT_ID')) //notice the below line.. use of split function ajaxResult = ajaxRequest.get().split(',') $s( 'P11_CCSS_STATUS' , ajaxResult[0]); $s( 'P11_COPAY' , ajaxResult[1]); }
Example: http://apex.oracle.com/pls/apex/f?p=12060:110
Kind regards
Shijesh -
dynamically change the value of a selection list in the form based on a table
Hi friends,
I use a form based on a table. I want to display two fields in the form of lists of selection instead of text boxes and when a value
in a select list is selected, the corresponding values will be included in the next list of selection. For example if Department
value is selected in a selection list that employees in this Department will be included in the employee selection list. I saw a
even using ajax to achieve this as a table in the Dene example application [click here | http://apex.oracle.com/pls/otn/f?p=31517:176:462842537250908:NO].
Is it possible to achieve the same for a form based on a table.
Thank you
TJHi TJ.
Take a look on: [http://apex.oracle.com/pls/otn/f?p=56976:4] - instructions are on the page
Andy
-
This is a bug or a really bad and frustrating idea for a story.
(1) in the layers panel, select a text layer, it highlights
2) change to the text tool
3) click on the text element in the workspace
OR
(1) select a layer in the layers panel
(2) Ctrl-J, new layer by copying
EXPECTED: Panel layers rest in the same position
REAL: Panel layers scrolls the element selected or new layer to the top of the Panel. BORING.
I do not need or want Photoshop to make decisions for me, space to work around to move without asking, or generally to spoil my flow!
Please fix this or give me an option to turn it off as soon as POSSIBLE.
You have successfully updated to 2015.0.1?
The bug known as in the original message has been fixed in this version.
Maybe you are looking for
-
Mozilla offers the equivalent of Google FAVORITES list?
Google has a list of FAVORITE Web sites, I use frequently or want to remember for futire reference. Mozilla has a similar feature? How can I open it?
-
HP G62-149WM/updated software driver for card MicroSoft Virt.WiFi Miniport
(OS = windows 7 Home Premium) PROBLEM = IN DEV. MNGR. updated SOFTWARE (MICROSOFT VIRTUAL WiFi MINIPORT ADAPTER) a MESSAGE WINDOWS SURGIT IN SAYING some THING LIKE "IT DON'T RECOGNIZE the PUBLISHER OF THE DRIVER SOFTWARE", THEN ME GIVES OPTIONS to
-
NET 3.5 will not install error 80070645running vistaon a intel borad imuser
-
I have problems with my account. I have a laptop with Windows 7 Home Premium, I tried to open Windows Media Center, but this message keeps popping up "you are connected as a guest. Windows Media Center requires a non-invite account. If you change you
-
Windows mail in Vista-how to edit and resend a message
How can I change a message sent as new? need to change a message sent to change the dates and consisted of about 50 addresses as blind carbon copies - i don't want to have to return this entire list. I want to change the original message to change t