Total of the dynamics in a tabular presentation
I have a tabular presentation where people will be be detailing a sum of money. They would like to enter the amounts in the lines of the tabular form and as they enter into their they want out automatically at the top of the form so that they can see that it will match the amount they're trying to detail. How can I do this? I looked into dynamic action, but it does not seem possible with a tabular presentation, so it is maybe possible with Javascript? I have no idea how to do it well. Can anyone help?Thanks in advance. Apex version is 4.0.1.
The problem with dynamic action is that it would be able to calculate the total of lines that he can see. But for example:
http://Apex.Oracle.com/pls/Apex/f?p=45448:17
Calculates the total when you lose the focus of an element.
The problem is the loading of the page, it is this same calculation several times - so either disable the execute on property to load the page and add a dynamic action similar to the loading of the page so that it works only once, or simply put up with it.
Anyway, the DA:
Event: change
Selection type: jQuery selector
jQuery selector: input [name = "f03"]
Action: run the JS code.
Code:
var total = 0;
$('input[name="' + this.triggeringElement.name + '"]').each(function(){
total+=parseInt(this.value);
});
$s('P17_TOTAL', total);
This could be also an action define the true value, which is a little better you declaratively specify which element to assign instead of having in the JS code. In the case of the defined value, simply the variable on the last line of the JS code.
for example, set the value with JS would become:
var total = 0;
$('input[name="' + this.triggeringElement.name + '"]').each(function(){
total+=parseInt(this.value);
});
total;
Tags: Database
Similar Questions
-
How to apply the color to the line in a tabular presentation
Hello
My requirement is to apply the color to the line in a tabular presentation according to the conditions of the column value.
Thank you1243 Tulasi wrote:
I created a form of demo using the emp tablebut now it throw an error like "error report:"
ORA-06550: line 1, column 29:
PLS-00201: identifier 'CLERKS' must be declared.
ORA-06550: line 1, column 7:
PL/SQL: Statement ignoredhttp://Apex.Oracle.com/pls/Apex/f?p=16091:1:12227641756607:
Workspace: tipper
username: guest
password: demoPlease help me on this very urgent issue.
Thank you.
Check it now, only it was you must reference column names using bind variables syntax not #XXX #.
Refer to the help when you click on * model column 1 Expression * in your report model.
also, I noticed that you lose the background color when you mouseover it. To do this, you may need to remove the #HIGHLIGHT_ROW # of your model.
See you soon,.
Vikram -
Default value for the text in a tabular presentation element
Hello
I creates a tabular form generated by using a SQL query.
I would like to first of all the value for a column of nextval deault a sequence when an empty row is added using the add a LINE button
my request currently for the sequence value column when you click on the ADD row button is:
apex_item.display_and_save (4, NULL) as trans_id,.
I want this column trans_id trans_seq.nextval where trans_seq is a default sequence.
I tried specifying the default value in the column attributes (expression of PL/SQL - trans_seq.nextval) which does not work.
If I give in the SQL query, it throws an error saying that the unauthorized sequence here...
My query is structured as follows:
Appreciate any help in this regard. I hope that my question is explained clearlySELECT apex_item.display_and_save (4,c002) trans_id FROM apex_collections WHERE collection_name = 'TRANSACTIONS' UNION ALL SELECT apex_item.display_and_save (4,NULL) as trans_id FROM DUAL WHERE :request = 'ADD_ROW_MANUAL'
Thanks in advance,
Dippy
Published by: Fisher on February 16, 2010 12:41
Published by: Fisher on February 16, 2010 15:55Hello.
1. create a function named next_value
create or replace function next_value return number is ret_value number; begin select trans_seq.nextval into ret_value from dual; return ret_value; end;
2 display the query as below
SELECT apex_item.display_and_save (4,c002) trans_id FROM apex_collections WHERE collection_name = 'TRANSACTIONS' UNION ALL SELECT apex_item.display_and_save (4,next_value()) as trans_id FROM DUAL WHERE :request = 'ADD_ROW_MANUAL'
Kind regards
Shijesh -
Show/Hide button on the line on a tabular presentation depend on the values of line.
I want to show/hide (or toggle so easy) a button link to page of line on a dependant in a table on the other line values.
For example if I had a table, built form using the form wizard based on the EMP table with a query: -.
Select
EMPNO,
EMPNO EMPNO_DISPLAY,
ENAME,
EMPLOYMENT,
BISHOP.
HIREDATE,
SAL,
COMM,
DEPTNO,
'button' but1
from EMP
The column of buttons is used as a link to a page. But I only want to be displayed/activated if the WORK is a "SELLER". Does anyone know how to do this? Or give me any suggestions?
Another option would be to have a button under the lines enabled/disabled depending on when you click on a line and this line having a JOB "SELLING."
Thanks, PeteThen - under condition - select the exact anchor (+ image) of your select statement (and display it as as a standard report column).
(Unfortunately) does not allow any conditional display for a link (or a link element) in a tabular form (in the current version, should be a nice improvement however). -
Dynamically set read-only columns in the tabular presentation at record levels
Hello
Is it possible to activate and deactivate fields at the level of the line in a tabular presentation... I use OFA to create a page that should give the possibility to activate and deactivate certain fields in the table on the fly...
Here's the requirement:
examples of data
Item_code | Review | Point Attrib1 | Article attrib2 | Article attrib3 | Columna | ColumnB
1.234 100 A B _ A _
1.235 100 B _ B _ A
fields point attrib3 and Columnb should be read-only if the value of attrib1 point is A
Even if point value attrib1 is B columna and attrib2 of the element must be read-only...
I have PPR on item_attrb1 to manage the change of value in the attrib1 element, but I'm not able to make fields read only at the level of the line... Please help me if someone has work around this
Is this possible?
Thank you
Dilip
Hello..
It is possible. Made myself.
You must use SPEL for this.
Steps to follow:
1. the Caisse one type of transitional say as Boolean column ReadOnly
2 set the Readonly property for that column as ReadOnly
(Syntax FRO SPEL-> {oa. VO. ReadOnly})
3 al ' PPR after checking the status, the ReadOnly Anaïs value accordingly.
.
You can get the idea here.
https://blogs.Oracle.com/manojmadhusoodanan/entry/hiding_an_item_conditionally_through
-
Tabular presentation - hide/show the Datepicker calendar
Hello
I am toggling of a column of date picker in tabular form wizard based on the value of another column in the same row, using javascript. However, I was unable to find a way to hide/show the associated calendar. Can someone tell me how to proceed?
Thank you!Hello
The structure on a tabular presentation for a date picker article, is more complicated than for a normal input field:
<td headers="Hiredate" class="t4data"> <fieldset class="datepicker" id="f04_0004_fieldset"> <table summary="" border="0" cellspacing="0" cellpadding="0" class="datepicker" id="f04_0004_holder"> <tr> <td class="datepicker"> <input type="text" name="f04" size="7" maxlength="2000" value="01/05/1981" id="f04_0004" /> </td> <td> <a href="javascript:void($p_DatePicker('f04_0004','0','DD/MM/YYYY','#666666','','','','','1981','en-gb','Y','45958','1683565711731582981','05','210'));"> <img src="/i/asfdcldr.gif" alt="Calendar" align="absmiddle" /> </a> </td> </tr> </table> </fieldset> </td>
While access to the input box by referencing its name attribute, it is impossible to the icon. What you need to do is find the input field, go up to the TR that contains, find indicator A in this TR and hide.
Try something like:
<script type="text/javascript"> function disableDatepickers() { var f1 = document.getElementsByName("f01"); var f4 = document.getElementsByName("f04"); var k; var r; var a; for (k = 0; k < f1.length; k++) { if (parseInt(f1[k].value) < 7800) { f4[k].disabled = true; r = html_CascadeUpTill(f4[k].id,'TR'); a = r.getElementsByTagName("A")[0]; a.style.visibility = 'hidden'; } } } disableDatepickers(); </script>
In this example, the first column (f01) contains an EMPNO. If this value is < 7800, I find the datepicker and disable it, then find the A tag that is in the same b and hide. Adjust the f01 and f04 accordance with column names and change the IF test to meet your needs.
Andy
-
Hi all
I haven't worked much on tabular forms and JS. I'm looking for help in this regard.
I'm working on a tabular presentation. with several editable fields... I need to disable a column (just for this single line), which contains an image, based on a field of LOV (static) list) (Y/N). The image column must be disabled if the value is N.
My SQL for the report is something like this: (will keep things simple)
Select
emp_id,
emp_name,
static_list,
(case when STATIC_LIST = "Y" THEN ' < a title = "Edit SAMPLE TBL" href = "f?) p = & APP_ID.:10: & APP_SESSION.:NO:P10_EMP_ID, P10_EMP_NAME :'|| EMP_ID | «, » || EMP_NAME | "" "> < img src =" "#IMAGE_PREFIX #SAMPLE.gif" border = '0' (> < /a > ' other ' ' end) as disable_col, "
dept_name
of sample_table
I scoured the topics in this forum. Most of them were made using the table ID f_001, f_002.
I tried to follow the same path by inspecting the item but the disable_col does not have any ID. Let's say, f_003 is for the static list and f_004 is assigned to dept_name.
I tried dynamic actions, but it did not work. Read in a topic that dynamic action does not work on tables. So I chose this approach. Is there a simpler way to solve this?
need your help on how to proceed with this scenario. Thank you in advance.
Versions: Apex: 4.2, DB: 11 g
Thank you
Daniel
Hi Daniel_A,
Daniel_A wrote:
I did my job in Page 4.
If the IS_VALID column is select as 'Yes' then the column hyper must be enabled, allowing the user to click on it. If she chose the 'no', then the column Hyper must be disabled for this line.
The initial question about toggle the hyperlink is resolved. Check your App-> Page 4 35160.
This is done with the help of two dynamic actions:
- DA first loading of the Page / after updating of region "tabular":
Event: After refresh
Selection type: region
Region: The other 'tabular '.
Condition: No strings attached
Action: Run the JavaScript Code
Fire on loading the Page: Yes
Code:
$( 'select[name="f08"]' ).each(function() { if ( $(this).val() === "N" ) { $(this).closest("tr").find('td[headers="HYPER"]').find("a").addClass("apex_disabled").unbind("click"); } });
Items concerned: no item affected
- Second DA on the evolution of the selection list:
Event: change
Selection type: jQuery Selector
jQuery Selector: select [name = "f08"]
Condition: No strings attached
Action: Run the JavaScript Code
Fire on loading the Page: No.
Code:
var el = this.triggeringElement; if ( el.value === "N" ) { $(el).closest("tr").find('td[headers="HYPER"]').find("a").addClass("apex_disabled").unbind("click"); } else { $(el).closest("tr").find('td[headers="HYPER"]').find("a").removeClass("apex_disabled").bind("click"); }
Items concerned: no item affected
NOTE: as the original question/topic related to toggle the image link in the column, for the problem with the Page 5, please create a new thread with the details.
Kind regards
Kiran
-
Look for the lines selected on a tabular presentation
Hello guys and girls,
I have a small problem trying to understand if/how I can check by pressing the "submit" button if there where no records selected in my tabular presentation.
To explain better: I have a selection list in which the user select an employee. On this choice, a tabular presentation appears with the own products for this employee.
The user must check at least one of the lines to go further.
If the user does not select all and always press the "submit" button you should see an error message saying: "there are no selected product."
What I was doing until now (stupid I suppose) was to create a Boolean as validation:
DECLARE
vRow directory;
BEGIN
BECAUSE me in 1... apex_application.g_f01. COUNTY
LOOP
vRow: = apex_application.g_f01 (i);
If vRow is NULL then
Returns false;
on the other
Returns true;
end if;
END LOOP;
END;
But does not work. If I have no active records it will say nothing and let me go. If I check something even record.
Help, please.
There must be something that I have no idea about.
Thank you very much.
Gabriel
Checkboxes only support values for the lines. For example, a loop on the table will always return true since vRow will never be NULL. In addition, a table with a number equal = 0 will not be locked during all, again don't generate no errors.
No loop, just check apex_application.g_f01. COUNTY. If it is 0, no checkboxes have been verified.
-
Hello world
I have a tabular presentation based on a collection. The column c050 (f30 cards) will be either Y/N. If it is there, then I would enable the column c024 (f24 cards) (which is be based on lov radio button). If the value of c050 = N, then disable c024. There are potentially as many lines, and the c024 element would only be enable / disabled for the specific line. So if line 1 is c050 = Y line 2 is C050 = N then rank 1 c024 is activated and 2nd c024 is disabled. Hope that makes sense.
I created a dynamic action called turn HMS fields.
event = CHANGE
selection type = jquery selector
jQuery selector = input [name = "f30"]
the condition EQUAL to
value Y
true action1 - enable, picker jquery, input [name = "f24"]
real action 2 - alert, you added a sort of HMS. There may be additional data to enter. Thank you
fake Action1 - disable jquery selector, input [name = "f24"]
false action2 - alert, no worries of hms.
Alerts in both cases show correctly... but nothing seems to happen to f24... What am I doing wrong?
Thank you
AGH! This is the first time you mention, that there is a radio button! That changes a lot! As you can see, the format is different (f24_0001_0001) than what we discussed (f24_0001).
Radio buttons have their own quirks. My bad, I should have asked what you had. But since you said your selectors original input were I just thought they are fields of text or something like that.
How replace you a right drop-down list so that you can see all the work? And understand it fully.
Then you can work on the radio button option.
If you don't get there... I will ask you to install an example in apex.oracle.com and give me credentials to sign in and have a look.
I could re - try the js on my side with a radio, but it will take time.
So, just to be clear... f30 is a drop down and f24 is a radio?
See this line:
$x_disableItem ("f24_" + row, true);
Will NEVER find the radio buttons because it lacks the 3rd 0001 and 0002 (how many options do you have?)
So maybe try you like this:
$x_disableItem ("f24_" + line + '_0001', true);
$x_disableItem ("f24_" + line + "_0002", true);
... keep for options...
Do the same for the fake, of course.
But I think that this needs a better approach if you have radio buttons. I just need to get out.
OK, go try things...
Thank you
-Jorge
-
Try to use the plugin to watermark on a tabular presentation
Hi all - I'm currently running Application Express 4.1.0.00.32.
I have a form of table with a single column designated as an entrable field. I downloaded the watermark plugin and created a new element using the plugin.
If I create a basic form I can select my watermark in the list of menu drop-down ' view as ", but this option is not available for me in my tabular presentation. I'd like to be able to get this to work so that a user could see the watermark on all entrable lines in tabular form.
Is this just a limitation of the APEX and if so are there ways around that?
Thanks in advance,
JohnJohn
You can put the code in the run when the Page loadspage attribute.
Or you could put it in a dynamic action with pageload of the event.Nicolette
-
Get the selected value of a select list item in a tabular presentation.
Hi, I have a tabular form and I'm trying to get the selected value of a select list item and store the selected value in a page element hidden elsewhere on the form of tables, so I can use this value.
I already have something similar to the input on the tabular presentation elements.
Get the initial values
var line = $x_UpTill (this.triggeringElement, 'TR');
numberOfItems var = $(' input [nom = "f12"]', ligne) [0];
numberOfItems = 123456.123
What I want to do is soemthing similar as above but capture the value of a select element in tabular form. I thought I could do something like:
Get the selected value
var line = $x_UpTill (this.triggeringElement, 'TR');
numberOfItems var = $('selected [name = "f08"] .val ()', line) [0];
But this method leaves the as undefined var numberOfItems.
Please help me to find a way to identify the item 'select' in the tabular form called "f08" and get this value.
I am a newbie to jQuery selectors etc...
Thank you.Strange that you do not get an error when you run your 2nd selector.
In any case for this kind of thing, see the HTML code of your tabular form and tell us what triggers, the element can be useful. Or better create an example at apex.oracle.com.
In any case, I see two errors:
(1) is there any html element "not selected" instead, the LOV in the APEX element has the select tag
(2) you can not write a. val() inside a selector that you must place it after your selection.So I'd like to rewrite your code to:
var line = $x_UpTill (this.triggeringElement, 'TR');
numberOfItems = $("select_[nom_="f08"]",_row).val () var [0]; -
Moving columns in the tabular presentation
Hello
I am newbie to Disco.Is it a shortcut to move columns the way we want in the tabular presentation or we have manually move column by column?
Thank you
KiranHello
I am newbie to Disco.Is it a shortcut to move columns the way we want in the tabular presentation or we have manually move column by column?
Not really, but it is often useful to drag the columns you want to play elements of page first before sliding down to set required in the tabular presentation.
Rod West
-
Tabular presentation - defining a line just to the first of the default value.
Hi all
How to set a default tabular form only in the first row?
When I click on "add row" I want the new line have an empty value.
Thanks in advance.Hello
When you add a new line to the shape of the table, all existing lines must be recorded in the database. You can, therefore, to verify the existence of these files and set the value of a page hidden as a result element. The default value for an item of tabular presentation can then rest on this hidden item.
This is possible by setting the Source used for "Always,...» "on the hidden item called, say, P1_DEPTNO_DEFAULT, and the Source to something like:
DECLARE X NUMBER; BEGIN SELECT COUNT(*) INTO X FROM EMP WHERE DEPTNO = :P1_DEPTNO; IF X > 0 THEN RETURN ''; ELSE RETURN :P1_DEPTNO; END IF; END;
It is a Type of Source of "body of the PL/SQL function.
In this example, we will check if there are all the records with a DEPTNO value that matches the P1_DEPTNO EMP. If there is, then the tabular presentation must contain at least one line already, so we return an empty string. If there is no record, the tabular presentation should be empty, so return us the value of P1_DEPTNO.
The default settings on the DEPTNO column in tabular form would then be:
Default type: (name of the application or page element) Element
Default: P1_DEPTNO_DEFAULTAndy
-
Tabular presentation - at first, place the cursor on any field
Hello
In a tabular presentation, when I try to 'add the line' how initially position the cursor on any field?
For example, when I add a line, I want to keep the cursor on the first EMPNO field (assuming that it is the first field).
Please let me know.
Thank you
Published by: user10544005 on November 5, 2008 20:00Hello
Put in footer of the report following region region:
<script type="text/javascript"> function setfocus() { var x = document.getElementsByName("f02"); if (x) { var l = x.length; if (x[l-1].value == "") { x[l-1].focus(); } else { x[0].focus(); } } } setfocus(); </script>
Replace "f02" regardless of the name attribute is for the EMPNO field (you can do a display on the page Source to verify this).
That will affect the focus to the last line, if it is empty, otherwise it will be to set the focus to the first line. The code runs when the page is loaded.
Andy
-
Changing the shape of tabular presentation
I want to change the format of my TABLE of FORM.
plaese help me with thisThe best way to do is to create a new page by using the wizard for creating tabular. When executing step by step through the wizard, select the tables and columns used in you current standard form and then complete the wizard. The result should be a tabular form on the same table and the columns that you have usednin your form.
Kind regards
Marc
Maybe you are looking for
-
Satellite Pro A - Webcam showing as unavailable
I've never used a camera with my PC before bear so with me. I used my cell phone now for about 3 months and for the life of me I can't get the webcam to work. I read the guide info, I downloaded the software from the site & it shows as "not available
-
HP x 2 Pro 410 G1: Audio driver
This is in conflict with Windows Media Player 10 - HP IDT High - Definition (HD) Audio Driver 6.10.6498.0 17 January 2014, previous Version: 6.10.6495.0(20 Dec 2013), System: Microsoft Windows 8.1 (64-bit). Or other media players (QuickTime, VLC) wor
-
3 monitors listed in the Device Manager on Tecra A6 PTA60E
I have a PTA60E A6 under Xp Pro SP3 with all updates. I notice that in Device Manager in the monitors, I have three monitors monitors under graphics cards and Play Plug listed abd, I have the Intel 945 chipset appears twice. How to get back to showin
-
CD part downloads between two iTunes accounts on the same MacBook Pro
We have a MacBook Pro shared between two users Can I share a CD downloaded on two iTunes accounts, without using home sharing? I don't really want to download the same CD twice as that would waste space unnecessary. Thank you
-
Please help windows xp pro crash error ESENT 490,473,454,439,470
Microsoft Fix it 50202