Total of a column when the check box is selected in table form
Hi all
Total of a column when the checkbox is enabled in the form of tables, but is not work, help
|
My credentials for my worksapce:
https://Apex.Oracle.com/pls/apex/
Workspace: GB
USERNAE: [email protected]
PASSWORD; GB
Thank you.
Kind regards
GB
Hi user13028844,
user13028844 wrote:
Please change your login username of "user13028844" to something meaningful. Reference: Video tutorial how to change username available
The second button is a javascript function call, which is not a summary. the javascript function has a problem
This function has the problem help me correct, whereas we can summarize the amount of lines checked
I have made changes to your page. Check the "Display of Javascript" button, now it shows the correct amount for active items.
Made the following changes:
- The following are removed from the section "run when Page Loads:
Declare p_qty number; p_total_qty number := 0 ; Begin for i in 1..APEX_APPLICATION.G_F01.COUNT LOOP select nvl(qty,0) qty into p_qty from DURATION where id = to_number(APEX_APPLICATION.G_F01(i)); p_total_qty := p_total_qty + p_qty; end loop; --htp.prn(p_total_qty); htp.prn(''); apex_application.g_print_success_message := 'Checked total qty:'||p_total_qty ; End;
NOTE: The section "run when Page Loads" is intended for JavaScript code to perform the loading of the Page and NOT PL/SQL code.
- The following code removed from the section "Header HTML":
This code was going nowhere, so removed and replaced with code below.
- Added the following code in the section "function and Global Variable declaration:
function enableButton() { // code goes here } function total_checked() { var total = 0; var qty = 0; $( 'input[name="f01"]' ).each(function() { if ( $(this).is(':checked') ){ qty = $(this).closest('tr').find('td[headers="quantity"]').text(); total += parseFloat(qty); } }); alert("Checked Total Quantity : " + total); }
Your APEX_ITEM. BOX calls a JS "enableButton" function, but it has no definition, dummy definition so added.
Kind regards
Kiran
Tags: Database
Similar Questions
-
Reposition the cursor when the check box is selected
Good day all.
I'm trying to figure out how I can reposition the cursor in a text field once I've selected a checkbox.
Example; I have 3 boxes can select use. When the user selects the check box, I want to cursor to move to this box.
Does anyone know how this could be done?
Using Adobe LifeCycle Designer 8.0
Windows XP Pro
Thank you all
Chomp
No Chomp problem, I updated the form that you posted to set focus in the first textfield in the hidden subform (criterion 1). I published the form here:
https://Acrobat.com/#d=46bhrRPpzUOEN4XI7--W-w
Notice how the full path should be clearly explained when fields bound, in this case, a check box and a text field, are in different subforms.
If you never do know what the full path to a field, click a different field, click in the script Manager window, then ctrl + click the field you want the path. If you have this selected field ctrl + click 'this' will return just as he will himself reference in the script manager.
-
Fill in the fields when the check box is selected
I have a simple question...
I have a simple form, which requires the user to enter a shipping address and a billing address. I added a checkbox, I want to complete the address fields expedition with the billing address fields if they are identical. This is so that the user has to type two times. You've seen this in a lot of shopping cart checkout systems.
I don't know anything about scripts in LiveCycle, but I think you can use Javascript? I am somewhat familiar with it, but not enough to achieve this. Can someone help me with this? I would appreciate.
I realize there are some people older solutions to this problem on other threads, but the links are broken, and nothing has worked.
I have attached the PDF in question.
Thank you
Here you go... .the code is located on the change event of the checkbox.
Paul
-
Impossible to verify if the check box is selected
I am trying to execute a JavaScript function that triggers, when a check box is selected.
I have a problem, this function of packaging
The condition that I am applying does not-
I need to check only one box to check, not a table.if(document.wwv_flow.f01.checked == true)
Here is the code of the function:
What is the problem with my condition?function boxesCheck3( cb ){ if(document.wwv_flow.f01.checked == true){ //do the job } else { //do nothing } }
Thank you!Hello
Try
function boxesCheck3( cb ){ if(cb.checked){ var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=VALIDATE_DELETE',0); get.addParam('x01',cb.value); gReturn = get.get(); get = null; var aReturn=gReturn.split("|",2); alert(aReturn[0]); if (!aReturn[0].match(/^.*_OK$/)){ alert(aReturn[1]); cb.checked=false; } } }
Kind regards
Jari -
If choose something lower down then the check box is selected
I want to choose from a list in the drop-down menu. According to what is selected, then a box will be checked automatically. This
is what I have so far for the script.
If (list == 'blah') then this.rawValue = 1
I do not know if it to JavaScript or FormCalc... I guess JavaScript because there is no calculation. I'm also not sure whether to put the script on the drop-down list or checkbox. Also in which should case I use?
Thank you
Him == is used to compare two values. then you use it properly in the case. When yo want to assign a value to an object, then a unique sign = is used. So, your code should be CheckTwo.rawValue = 1.
You can use an OR condition to check multiple values of th FEI statement. So if the box should be checked if they choose blah, blah2 or blah1 then you might do this:
If ((this.rawValue == "blah") |) (this.rawValue == "blah1"). (this.rawValue is "blah2")) {
CheckTwo.rawValue = 1;
} else {}
CheckTwo.rawValue = 0;
}
Make sure to uncheck the checkbox if none of these options are chosen. That way if they choose one of these options (the check box is selected), and then they change their mind and choose a different value it should be disabled.
Make sense?
Paul
-
updated in real time of the values when a check box is selected
Hello
I have a form with elements of the address
Physical street address, physical city etc etc.
I have also the same for address Street, city ett etc. on the same entry form
I want to include a checkbox which when selected fills the values of the mailing list
list physical values. The box would be as ' select this option if the update to the post office
the address is the same as the physical address '
I know how to do this with a process and send the page. May I, however, when the box is
selected, or at least define the display attributes for read only for items in the mailing address of the box is activated?
Thank you very much
SteveSteve,
No problem.
$x is a wrapper for the APEX to document.getElementById () JavaScript; It's a heck of a lot easier to simply use $x vs the longer string. Please keep in mind that it will be only when you include the JavaScript libraries of APEX, which, by default, are included with each page APEX.
What about a book, Yes, I can offer a: Pro Oracle Application Express (http://www.amazon.com/Oracle-Application-Express-Experts-Voice/dp/159059827X) Chapter 8 covers Ajax Javascript, & this is where I would start.
There are also a lot of other online resources, including this Forum, that can help you learn how to use JavaScript & APEX.
Thank you
-Scott-
http://spendolini.blogspot.com/
http://sumnertechnologies.com/ -
identify the areas where the check box is selected
Hi all
I have a page that contains 3 report areas, each with a checkbox column. The user has the option to select lines in each region and I need store the selected lines in a database table.
I created the sub process to insert data into the table.
BECAUSE me in 1.APEX_APPLICATION. G_F01. Count
LOOP
insert into tbl_name (c1, c2, c3) values (v1, APEX_APPLICATION. G_F01 (i), v3);
END LOOP;
The process is executing well and insert the data into the table. But the problem is when the user select lines in different regions, I get all the lines inserted in the tables, but I'm not able to identify which line is selected in which region. Is it possible to identify the area where the line is checked.
Thanks in advance for the help.
Kind regards
PrasanthHi Prasanth,
Your probably using the apex_item package to generate checkboxes. So, try to change the p_idx parameter.
In your case, it is probably p_idx-online 1. In other 2 reports put at 2 and 3 and then to the process you can extract only with in APEX_APPLICATION. G_F02 and APEX_APPLICATION. G_F03 berries.BR,
Marko Goricki
-------------------------
http://apexbyg.blogspot.com/ -
How to cancel "Make this folder private" when the check box is greyed out and inaccessible?
I am running XP Home edition w/SP3. I am the only user account so I should have administrator privileges, but when I try to cancel "Make this folder private" checkbox is greyed out and inaccessible. I tried the solution of http://windowsxp.mvps.org/undoprivate.htm nothing works. When I start safe mode and follow the instructions of the Security Watch tab the 'total control' checked but greyed out as boxes. I try to get access to my home network.
Pulling my hair out!
Bart
See if this helps: you can not select the Option "make this folder private"
-
Turn on the switch when a check box is selected in a report
Hello
I'll have a report with a box with the code column such as
I have 2 buttons named "discover" and "Provision" in the same region of report. I want to activate the button whenapex_item.checkbox(1,"EQUIPMENT_ID") Tick, EQUIPMENT_TYPE as "Device Type", EQUIPMENT_NAME as "Device Name", CUSTOMER_NAME as "Customer Name", SITE_NAME as "Site Name" from DEVICE_VIEW
at least one box is checked. How can I do this
Thank you
TJTJ,
It's to do with the JS. See this piece of code in above JS.
>
ARR = document. Forms [0]. F01
JS here made the implicit conversion. If your report returns multiple lines and then stop will become an array object, then everything works as expected. If your query returns a single row, Rios will be just an input arr.length element will be undefined.
So replace enableButton() JS code
See you soon,.
HariPublished by: Hari_639 on September 27, 2009 13:59
-
Muse freezes when the text box is selected
I know that this problem was supposed to be solved with a previous update, but I use Muse with Mac OS Mavericks and I can't select a text without freezing Muse box. Other functions seem to work, such as place images and downloading via FTP Muse publishing. Anyone know how to fix this? Thank you. JimK
Muse is simply suspended without any error message? Looks like we will need to take a look at your file and try to reproduce and diagnose the shot.
Please send us the .muse file at [email protected] as well as a link to this topic. If the file is larger than 20 MB, you can use a service like Adobe SendNow, Dropbox, WeTransfer, etc. (if you use a service, please include your email address in the body of the message back, given that not all services to include it in the invite sharing they send.) Thank you.
-
I have a pdf form that has 4 columns, with each column having 28 check boxes and text between. I did so he goes by column, but when I do anything for a checkbox it takes it out of line. How can I keep that from happening?
You talk about the tab order? If Yes, go to Edit - Preferences - forms and make sure the box "Automatically adjust tab order when changing fields" is NOT checked.
-
Clear the check box according to the value of column DB
Hello
My requirement is to disable the check box according to the value of a column DB. Say for example my report displays the following. Check box, the name of the EMP, Dept. If the Department is the checkbox should be disabled and user should not be able to select the check box.
Ask your help for a solution.
Thank you
PrasanthYou must use the parameter p_attributes of the apex_item.checkbox API to make the boxes off (readonly do not work with the checkboxes)
SELECT .. CASE WHEN
THEN APEX_ITEM.CHECKBOX(1, ) ELSE APEX_ITEM.CHECKBOX(1, ,'disabled="disabled"') END .. -
How to disable the check box (line selector) in a tabular report of APEX
I have a report in tabular form with checkboxes which is filled by a SQL query. For some lines, I want to disable (or not) the box according to the value of one of the columns of that particular line (if the value of a column defined as Date is less than sysdate, I don't want to display the checkbox for that rank). I tried to use the conditional display in the section of the column attribute of the checkbox, but I can't access this Date column that is currently selected in a view in the SQL source. I used variables such as: name-of_column, V(':name-of_column'), but always get a NULL value for this column in the SQL code I'm trying code in conditional display section. For this reason, my condition does not work correctly.
What I am doing wrong? Exceeds my correct approach?
Hi Ajay,
I don't think you can handle this with a conditional display, as that works on the column rather than level level line.
The way I see it, there are two things you can do:
(1) approach to sql, where youo make the checkbox in your query using apex_item.checkbox, see the documentation of oracle for detailed information on the use of the APEX_ITEM
You'll end up with a query like
Select case when YOUR_DATE_COLUMN<>
then null
else apex_item.checkbox2 (p_idx-online 1
p_value-online YOUR_DATE_COLUMN
)
,
from YOUR_TABLE
(2) an approach JavaScript in which you create a dynamic action check your date column in a table and when the need hides and disables the check box for that rank.
First option is more robust, but it will take a little more work. Second option is faster to develop, but may have different effects on various browsers and browser versions.
Regads,
Vincent
-
Try to build the form using the check boxes - need help
I am creating features using a region on the left to contain what I want (and it is stopped), an area on the right that contains all the rest I might add, with buttons in the middle to get things back (Add/Remove). I try to use the collections and APEX_ITEM. CHECKBOX and everything just do not have luck using the check boxes at all. Can someone tell me please a tutorial or an example that works in the way to read a collection by using the checkboxes and manipulate? Normally, I uses a FRONT of Validations process to update the collection with the changes that the user has provided, then follow up with any validations, then run any what DB written/modifications/deletions in a page AFTER VALIDATION process.
Here's what I have so far:
Area to the left (list of items already included in the package)
(On the process of loading Page (before header) -: P182_PKG_ID is passed as input)
Report area (column 2)apex_collection.create_or_truncate_collection (p_collection_name => 'DOCWIZ_CHKLST'); declare v_lnid NUMBER; v_ordr NUMBER; v_pkg NUMBER; v_type NUMBER; v_typenm VARCHAR2(47); cursor c_prepop is select a.ID, a.DOC_ORDER, a.DOC_PKG_ID, a.DOC_TYPE_ID, t.DOC_TYPE_NM from DOC_ASSIGN a, DOC_TYPE t where a.DOC_TYPE_ID = t.DOC_TYPE_ID and a.DOC_PKG_ID = :P182_PKG_ID order by a.DOC_ORDER; begin OPEN c_prepop; LOOP FETCH c_prepop into v_lnid, v_ordr, v_pkg, v_type, v_typenm; EXIT WHEN c_prepop%NOTFOUND; APEX_COLLECTION.ADD_MEMBER( p_collection_name => 'DOCWIZ_CHKLST', p_c001 => 0, --CHKBX p_c002 => v_lnid, --ID p_c003 => v_ordr, --DOC_ORDER p_c004 => v_pkg, --DOC_PKG_ID p_c005 => v_type, --DOC_TYPE_ID p_c006 => v_typenm --DOC_TYPE_NM ); END LOOP; CLOSE c_prepop; end;
Area to the right (complete list of topics already in the package possibilities)SELECT apex_item.DISPLAY_AND_SAVE(1, SEQ_ID) SEQ_ID, apex_item.CHECKBOX(2, c001, 'UNCHECKED') CHKBX, apex_item.DISPLAY_AND_SAVE(3, c002) ID, apex_item.TEXT(4, c003, 3, 3) DOC_ORDER, apex_item.DISPLAY_AND_SAVE(5, c004) DOC_PKG_ID, apex_item.DISPLAY_AND_SAVE(6, c005) DOC_TYPE_ID, apex_item.DISPLAY_AND_SAVE(7, c006) DOC_TYPE_NM from APEX_COLLECTIONS where COLLECTION_NAME = 'DOCWIZ_CHKLST'
(On the process of loading Page (before header) -: P182_PKG_ID is passed as input)
Report area (column 2)--Prep collection --------------------------------------------- apex_collection.create_or_truncate_collection (p_collection_name => 'DOCWIZ_TYPLST'); declare v_lnid NUMBER; v_ordr NUMBER; v_pkg NUMBER; v_type NUMBER; v_typenm VARCHAR2(47); cursor c_prepop is select 0, 0, :P182_PKG_ID, t.DOC_TYPE_ID, t.DOC_TYPE_NM from DOC_TYPE t where t.DOC_TYPE_ID not in (select DOC_TYPE_ID from DOC_ASSIGN where DOC_PKG_ID = :P182_PKG_ID) and t.DOC_TYPE_ID > 0; begin OPEN c_prepop; LOOP FETCH c_prepop into v_lnid, v_ordr, v_pkg, v_type, v_typenm; EXIT WHEN c_prepop%NOTFOUND; APEX_COLLECTION.ADD_MEMBER( p_collection_name => 'DOCWIZ_TYPLST', p_c001 => 0, --CHKBX p_c002 => v_lnid, --ID p_c003 => v_ordr, --DOC_ORDER p_c004 => v_pkg, --DOC_PKG_ID p_c005 => v_type, --DOC_TYPE_ID p_c006 => v_typenm --DOC_TYPE_NM ); END LOOP; CLOSE c_prepop; end;
Process - before validation page:SELECT apex_item.DISPLAY_AND_SAVE(1, SEQ_ID) SEQ_ID, apex_item.CHECKBOX(2, c001, 'UNCHECKED') CHKBX, apex_item.DISPLAY_AND_SAVE(3, c002) ID, apex_item.TEXT(4, c003, 3, 3) DOC_ORDER, apex_item.DISPLAY_AND_SAVE(5, c004) DOC_PKG_ID, apex_item.DISPLAY_AND_SAVE(6, c005) DOC_TYPE_ID, apex_item.DISPLAY_AND_SAVE(7, c006) DOC_TYPE_NM from APEX_COLLECTIONS where COLLECTION_NAME = 'DOCWIZ_TYPLST';
If anyone has a better way of doing things, I'm ready for it. The standard tabular forms appear not to be the right thing, because there will be TWO shapes on the page, that's why I went with a collection.Update Collection --------------------------------------------- declare i pls_integer := 0; begin for c1 in ( select seq_id from apex_collections where collection_name = 'DOCWIZ_CHKLST' order by seq_id) loop i := i+1; --CHKBX apex_collection.update_member_attribute (p_collection_name=> 'DOCWIZ_CHKLST', p_seq=> c1.seq_id,p_attr_number =>1,p_attr_value=>wwv_flow.g_f02(i)); --DOC_ORDER apex_collection.update_member_attribute (p_collection_name=> 'DOCWIZ_CHKLST', p_seq=> c1.seq_id,p_attr_number =>3,p_attr_value=>wwv_flow.g_f04(i)); end loop; end;
Hello
I just have a quick look and see what you're trying to do.
One thing, you might want to consider, is that you use to identify each item (those who become G_F01, G_F02 etc.), index numbers can be any number you like up to a maximum of 50. So, your region on the left could use numbers from 1 to 25 and those rights could use 26 to 50 - little matter if there are gaps in the numbers.
I'm actually about to close for the day because he went from 19:00 here now, so can't not consider this news right now - but if the above does not do, just update the thread and I'll have another look tomorrow.
Andy
-
To access the check boxes in the user interface programmatically
Hi all
I have the following usecase.
1. I have a table that has 3 columns, first two columns are read only output of the label component and the third column is a checkbox.
2. I have three lines in the table.
Now:
1. when a user selects the check box and click on a "submit" button I want to check that it should have selected at least one checkbox.
2. for which I tried to access the table from the user interface programmatically, but it does not work.
Is there a way I can access the values?
Thanks in advance,Hello
The box must be bound to an attribute line in the table is related to data collection. If yes then simply loop through the lines and check if the attribute has been set. For example, if each line has a "checked" property, so you can ensure at least a line "checked = true' in your action. To access the collection, you can use something like:
Object initialRowKey = table.getRowKey(); try { int count = table.getRowCount(); for (int i = 0; i < count; i++) { table.setRowIndex(i); MyObject row = (MyObject)table.getRowData(); if (row.isChecked()) { // do something, set a flag to true, etc. } } } finally { table.setRowKey(initialRowKey); }
The code above assume that you linked the table to your managed bean using the "required" attribute in the table.
Kind regards
~ Simon
Maybe you are looking for
-
Need to MS Word (change/create) on my Ipad
Hello! There is an app for MS Word, that I can download on my iPad, but I do not understand if it is a free application (simply display the option of + GETS near the Word icon) or do I have to pay any subscription types? If subscription required, how
-
Where can I file a complaint with the changes that have been made with the latest update of firefox? Two problems that I have are the tabs appearing even when there is only one tab open. The second is the url search bar and the search side bar being
-
How can I customize trash folder by date, most recent email on top?
I have just deleted email and tried to recover it but could not find it on the top of the column of Trash as dates and e-mails are all mixed. Previously all deletions are dated from the top down, the most recent on top.
-
OfficeJet 6100 x (H611a) will not be re - connect to the eprint Server
My printer HP Officejet 6100 (H611a) has been connected to the server eprint for over a year. A few days ago when I tried to print from my tablet, he told me that I was no longer connected to the server. When I went to the page of the built-in web s
-
Aspire XC G 703, thumb drive system backup
A USB stick 32 GB would be enough to back up my system, it has a 500GB SSD with 409 GB of free space, I would like to make it as bootable and being able to update if that is possible. Thank you