apex_item. CheckBox validation
Hi team,
I had created an interactive report in which I had created to check by using apex_item.checkbox.
I need a validation in Java script, could you please help me on this.
Validation required.
In my form, I have a button, if they do not selected the check box and click on the button, so I have to manage based on java script to select at least one check box and click the button for treat more.
Could you please help how we can achieve this.
Kind regards
Sruthitamiri
Hi Nanoo Tamiri,
You can do this by using javascript
assuming that f40 is the id of your checkbox field
replace the f40 with your own
Gives you sample code, change according to your requirement.
1. change your page-> header HTMl
function f_check() { var count = 0; count = $('input[name="f40"]:checked').length; if (count == 0) { alert('No checkbox is selected, please select atleast one checkbox.'); } else { apex.submit({ request:"SUBMIT"}); } }
2. change your button
Action : Redirect to URL URL : javascript:f_check();
Hope this helps you,
Kind regards
Jitendra
Tags: Database
Similar Questions
-
read apex_item.checkbox in a javascript script
Hi people,
I have a page of report of popup with a report of checkbox
Select apex_item.checkbox(1,empno) tur,
Ename,
job
EMP;
The user can click on the checkbox and give the button submit. I need to pass the value of the checkbox on the page parent via JavaScript. I know that the way to get the value of the item through JavaScript
Text1 = $v ("P4_COMMENTS");
But I don't know how to get all the item clicked is a Java variable. I even tried
< script >
function i() {}
AV = document.getElementById ("G_F01");
Alert (AV);
}
< /script >
Document.GetElement does not work in this case.
Please let me know how to extract the
Article apex_item. CheckBox checked in a JavaScript rather than PL/SQL block.
Thank you in advace
knockaert
Hello
Place the following script on the popup page to get the values back to page 1. Make sure that you call the javascript returnCheckedVals function by clicking on the submit button.
function returnCheckedVals(){
var pChked='';
//Get all the values of the checkbox by name
$("[name=f01]").each(function(){
if($(this).is(':checked')){
pChked = pChked+','+this.value;
}
});
//Remove comma at the front
pChked = pChked.substring(1);
alert(pChked);
//Return values back to page 1 item, imagining the popup report on page 2
opener.document.getElementById("P1_EMPLOYEE_IDS").value = pChked;
close();
}
-
Problem with apex_item.checkbox
Dear friends,
I m create a checkbox in interactive report through the query below.
Select apex_item.checkbox(1,EMPNO,'UNCHECKED') "', ENAME from EMP '"
But the result is < input type = "checkbox" name = "f01" value "7369" UNCHECKED = / > instead of the check box.
I use apex 4.1 with oracle 10g, considering that this query works perfectly in the apex 3.2
Can any1 please help me about this?
Concerning
KamranHello
Go change your report and then change this column. Change ' display as ', 'report type Column.
Kind regards
Jarihttp://dbswh.webhop.NET/dbswh/f?p=blog:Home:0
-
Increase the size made of apex_item.checkbox?
Hello
I display a SQL report, including an apex_item.checkbox, this is for use on a Tablet, so I would like to be able to increase the size of boxes that are displayed, to make them easier to select. Can I do this with the help of p_attributes or another way?
Thank you
MikeMike, UK says:
I display a SQL report, including an apex_item.checkbox, this is for use on a Tablet, so I would like to be able to increase the size of boxes that are displayed, to make them easier to select. Can I do this with the help of p_attributes or another way?You can try:
... p_attributes => 'style="width: 2em; height: 2em;"' ...
or use a sheet of style with a selector for the box or column:
/* Not IE6 or IE7/8 in quirks mode */ input[type="checkbox"] { width: 2em; height: 2em; }
Note, however, that support for the style box size varies greatly between browsers/versions.
-
Dynamic element appears in the reports - apex_item.checkbox
Hi all
I want to add a Checkl box to a report, and then select columns. So I used under query for this report.
But when I use top query and run the report, rather than view the check box on the report it shows simple HTML code for the box under column DELROW.SELECT apex_item.checkbox(1,Cus_ID) DELROW, Cus_ID Customer_Id, Cus_Name Customer_Name FROM Customer_List
This is an example
Any idea?<input type="checkbox" name="f01" value="2000" />
change the region of reoport, then change to standard column.
-
Checkbox validation based on the selection of the values LOV
I'm trying to validate a checkbox custom on the opportunity page, based on the selection of the values LOV.
For example only when the user selects 'rating = A', the box should be able to select and save.
If the user selects other that 'A' in the field assessment, the box should not save.
or
Is it possible to do, the READ ONLY checkbox, enable only when the side 'A' is selected.
Any thoughts / help on this.
Thank you, Kumar
Edited by: user10833334 may 4, 2010 06:43There is no function to make a read-only field based on the contents of another field, it is not an option. I will list my thoughts on how you might handle this below.
-Option 1: I recommend that you use validation to manage it. I don't know exactly to your needs, but you could write a field validation that checks to see if the flag is checked and rating <>has and sends an error message to the user, if it is not. The user would not be able to save the file until it Unchecks the box or sets the side = A.
Advantages: User gets a message explaining the problem with the data and is forced to fix it before you save it.
Cons: Requires interaction from the user to save and if they do not pay attention, the data may be lost if they cancelled without saving the changes.-Option 2: Another option would be to use the workflow to validate the registration. In this scenario, you can create a workflow that determines whether the field is out of adjustment, and if it is not correctly set, the workflow would update the box accordingly. In this scenario, you would use the 'Actions if Condition is False' also to inform the user that the flag cannot be controlled unless the side =. Then, you must set the Action "Update the values" update the uncontrolled field.
Pros: Manages the work without user interaction.
Cons: The con in this case, is that there is no workflow 'Before NEW record saved' trigger, so it is likely that the user sets the value incorrectly when creating the folder and it would stay like that until they update the record again.Some people might argue that there is another option that uses the functionality of dynamic page layout to make the field read-only, but this isn't a good option. You would need to convert using the Type of the opportunity in a way that would make use of the possibilities of lourdes for your users and I mention it only to you recommend to avoid his review completely.
Good luck and let me know if you have any questions.
Thom -
Add lines to the slot table with apex_item.checkbox form?
Hello
I created a data manipulation process to add a line in a tabular presentation. The problem is that I have a few boxes and when I click on the button to call the procedure for adding line is not
create one of the only text fields. Is anyway for me to create the checkboxes in this way?
Thanks in advance!Hello
Take a look on Re: Add a line in the detail table when the checkbox is enabled on a table of master report clone an entire line so it should include check boxes. Just make sure that ypu run updateInputs() or something similar to make sure that all the boxes have unique attributes "name".
Andy
-
apex_item. CheckBox
Hi all
I use APEX 4.2 and IE8.
I need a little help. I am trying to disable a check box value below is my code, but the question is always enabled. Am I missing something?
Thank youapex_item.checkbox(1,imm_document_type.id,'disabled=disabled;','CHECKED',NULL)
In my view, that the value of your property is false. Try this:
apex_item.checkbox(1,imm_document_type.id,'disabled="disabled"','CHECKED',NULL)
Edit:
Try the following codeapex_item.checkbox(1,2,'disabled="disabled" checked="checked"','CHECKED',NULL)
Prime does not box set to checked, but the other does.
Published by: chrdei on 10.12.2012 12:54
-
problem of apex_item. CheckBox
Hi all:
I have a problem to add a checkbox control to my report, I use the api apex_item.checkbox. I've seen many examples of how do and I tried different ways, but when I run the report does not display the box, it seems * < input type = "checkbox" name = "f01" value = "1" / > *.
I think I'm doing something wrong, but I can't see it.
The SQL I use is this:
I m using Apex 4.0.2.00.08 and Oracle XE 11 g.SELECT apex_item.checkbox(1,ca.cod_caso) checkbox, ca.cod_caso, ca.codigo_alterno, ca.descripcion desc_caso, cl.nombres_apellidos cliente, SUM (aca.duracion / 60) duracion, SUM (aca.valor) valor FROM act_caso ca, act_nombre_cliente cl, act_actividad_caso aca WHERE ca.cod_cliente = cl.cod_cliente AND ca.cod_caso = aca.cod_caso AND aca.fecha >= '01-MAY-2011' AND aca.cod_prefactura IS NULL GROUP BY apex_item.checkbox(1,ca.cod_caso), ca.cod_caso, ca.codigo_alterno, ca.descripcion, cl.nombres_apellidos
concerning
GerardIn the attributes of the report, change the column definition. Change the Type of display to Standard report column.
-
Issue of Apex_item. CheckBox
Hello
I created a report of the apex using apex_item.checkbox and apex_item.hidden, the source code looks similar to below:
Select
apex_item. Hidden (3, article_site).
apex_item. CheckBox (1, article_id, "onchange = 'spCheckChange (this)' ',: f_article_id, ' :') checkbox,")
article_id,
article_site,
article_creationdate
a articles
where article_id = decode (v ('P2_article_id'), cm, article_id, v('P2_article_id'))
and article_site = decode (v ('P2_article_site'), ", article_site, v('P2_article_site''));
Example of report looks at below
checkbox article_id, article_site, article_creationDate
1 yahoo.com 20/10/2010
Google.com 2 10/21/2010
MSN.com 3 22/10/2010
what I want, this is when a user selects the check box to select the records, insert selected article_id, article_site to another table called articles_2, so I created a process:
Begin
Because me in 1.apex_application. G_F01. Count
Loop
Insert into articles_2 (article_id, article_site)
Values (apex_application. G_F01 (i), apex_application. G_F03 (i));
End loop;
End;
If I check all items, the process will loop through each record and insert the selected records in the table of articles_2 properly.
But if I check only article 2, the article_id 2, then the process gets the right article_id but bad article_site values, for example.
It inserts article_id = 2 and article_site = yahoo.com in the articles_2 table.
Does anyone know what was wrong with my code?
Thanks in advance.Hi user8870431 (please tell us your name).
I don't know how your current process can work, but you must specify an index in the tables of G_Fxx, like this:
BEGIN FOR i IN 1..apex_application.G_F01.count LOOP INSERT INTO articles_2 (article_id, article_site) VALUES (apex_application.G_F01(i), apex_application.G_F03(i)); END LOOP; END;
Hope this helps,
JohnIf you find this information useful, please do not forget to mark the 'useful' or 'correct' post so that others benefit as well.
-
Trying to put an APEX_ITEM. CHECKBOX with JavaScript
I have a PL/SQL region that gives the user five blank lines. When the user enters an item # I have JavaScript validate the item # against our current list of products. If the item # is not found the user has the possibility to indicate that the element # entered must become a new element. In this case, I want to put a checkbox in the area to check.
The box is created as an apex_item.checkbox and each of them (in each row) has a identifier unique, e.g. new_item_1, new_item_2, etc. In the JavaScript code, I can see the value of a check box specified using alert ("checkbox value is" + $v (new_item_1)); or something similar. However, $s (new_item_1, "CHECKED"); does not the box to checked as expected.
What is the correct syntax for 'check' a dynamic check with JS?
Thank you
GregoryGregory,
You can use normal JS to check the box...
document.getElementById("itemID").checked = true; or $x("new_item_1").checked = true;
See you soon,.
Hari -
apex_item. CheckBox on a report
Hi all
I use apex_item.checkbox for a column in my report. But during the execution of the page, I see that we can change the check box on the report. I want "* show only *" on the reports so that users cannot modify.
Thank you
LucyI personally recommend investing in a query builder that has syntax highlighting. I bet that sql Developer (free Oracle) has it as well. If you look at a query in one of these tools, you will immediately see the issue.
Within a string, the strings must be escaped - the traditional way is to put the 2 single quotes for each regular single quote. There is also a feature called q introduced in 10G that you could use, but I personally never got the hang of it.
It work?
v_sql := v_sql || 'DECODE(column, '''||v_y||''', '''', null, '''') as Hotline, ';
-
Clear the check box to a report using APEX_ITEM. CHECKBOX
Hi friends,
I try to view my report with a checkbox control whose value of the column as "Y" or "n" in the table.
My query is as below:
Report shows all checkboxes unchecked and UNCHECKED regardless of the value of column ANNOUNCED (Y or N).SELECT APEX_ITEM.CHECKBOX(1,advertised,'disabled=disabled;' ||DECODE(advertised,'Y','CHECKED', 'UNCHECKED')) "Advertised Flag" FROM xyz;
Any suggestions that I am doing wrong in the query.
Thank you
Raj.Well,.
1. you have not said that
2. remove the CASE and you will get all of the disabled.
3. your code was wrong about the input parameters for the apex_item.checkbox function.
Denes Kubicek
-------------------------------------------------------------------
http://deneskubicek.blogspot.com/
http://www.Opal-consulting.de/training
http://Apex.Oracle.com/pls/OTN/f?p=31517:1
------------------------------------------------------------------- -
Use APEX_ITEM. SELECT_LIST_FROM_LOV report
Hi all
I try to create an editable state.
In this report, I have a few columns to allow users to update the information. I have a problem that my program return the current values of the APEX_ITEM. SELECT_LIST_FROM_LOV in specific checked lines.
For example:
Here is the code for my report:
-------------------------
1.
------------------------------------------------------SELECT apex_item.checkbox(1, h.nbt_po_seq, 'UNCHECKED') defaulted, --apex_item.hidden(4, h.nbt_po_seq) "PO_SEQ ", h.po_num, h.po_vendor_name, (select d.nbt_dept_desc from nbt_dept d where h.nbt_dept_seq = d.nbt_dept_seq) "dept_name", APEX_ITEM.SELECT_LIST_FROM_LOV (p_idx => 3, p_value =>NBT_LE_INFO_SEQ_holder, p_lov => 'NBT_LE_INFO', p_attributes =>NULL, p_show_null => 'YES', p_null_value => NULL, --'%NULL%', p_null_text => NULL, p_item_id => NULL, p_item_label => NULL, p_show_extra => 'YES') "LE_NUM" FROM nbt_po h
2. here's my validation, just to see what return values.
-------------------------------DECLARE l_message VARCHAR2 (4000); BEGIN FOR i IN 1 .. apex_application.g_f01.COUNT LOOP l_message := l_message || '<br>'|| 'LE_NUM: ' || :P17_LE_NUM || ' ' || 'Row ' ||i || ' ' || 'f01- '|| apex_application.g_f01(i)|| '<br>' || 'f02- '|| apex_application.g_f02(i)||'<br>' || 'f03- '||apex_application.g_f03(i) -- || 'f04- '||apex_application.g_f04(i) ||'<br>' -- || 'f01_' || '#ROWNUM#' || '<br>' ; END LOOP; RETURN LTRIM (l_message, '<br>'); END;
3. If I checked the line 3 and 5.
I can get correct ID of < b > h.nbt_po_seq < /b >, but for APEX_ITEM. Value SELECT_LIST_FROM_LOV, I'm getting rows 1 and 2, 3 and 5.
Can someone please help me and let me know how I can correctly return the values of selected line for 'APEX_ITEM. SELECT_LIST_FROM_LOV '?
Thank you
Ling
Published by: LK 14 Sep, 2012 22:52This explains how to get the selected rows:
http://Apex.Oracle.com/pls/OTN/f?p=31517:95
Denes Kubicek
-------------------------------------------------------------------
http://deneskubicek.blogspot.com/
http://www.Apress.com/9781430235125
http://Apex.Oracle.com/pls/OTN/f?p=31517:1
http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
------------------------------------------------------------------- -
Hello
I have a report with the box where I can select a record and then add to the database. I want to known how I will know if the user has clicked on one of the box for a particular process will be executed.
Only if the user choose a record of the report, he can call the process to be called with the click of a button.
How can I do this?
Thank youHello
Create a validation page (function returning a Boolean) level and write code similar to the
DECLARE v_count NUMBER := 0; BEGIN FOR i IN 1..APEX_APPLICATION.G_F01.COUNT LOOP IF APEX_APPLICATION.G_F01(i) IS NOT NULL THEN v_count := v_count + 1; END IF; END LOOP; IF v_count = 0 THEN RETURN TRUE; ELSE RETURN FALSE; END IF; END;
Consider your report query is similar to the following
select apex_item.checkbox(1,"PK_CLMN") Tick, col2, col3 FROM tbl_name
See you soon,.
Hari
Maybe you are looking for
-
is it possible for me to use maps created by MS streets and trips 2007?
I just bought MS streets and trips 2013. I have a lot of maps created in MS streets and trips 2007. Is it possible to convrt these maps in a format that is compatible with ver2013?
-
ARE THERE WINDOWS 8 TO 8.1 UPGRADE FEES?
I received an email saying that I can get a free update of Windows 8 to 8.1 now I just see that if you download the upgrade through Windows there are a load of HP. It is a HP computer brand new so I thought that maybe it's a promotion at HP and I wan
-
I upgraded OS 10.2.0.429 on my Z10 after that I had problems with the battery (descends very quickly) and can't recharge my backup. I decided to go back to the old operating system using bblink and parameters to reload settings factory but OS still 1
-
How to recover the complete installation of NDK IDE SDK?
I just downloaded the gold 10.1, my NDK 10.0 and 10.1 in the same place. I have not updated my device and the IDE does not compile because the target device has older software. Now, I want to know how to recover the SDK outside of a full installation
-
Hi all I have Windows 7 Professional in a domain environment. For the first time in Windows 7, close, he'll wait almost 10 minutes before the session is closed and closing screen out. And it will have a blue screen. However, if I choose to restart t