Avoid repeating the selected values on the tabular form select list
Hello
I need help with the following situation:
I have a selection list containing all departments. When the user selects a Department, a tabular presentation appears with a list of selection employees containing on this Department. When adding new employees (new lines), I would like to remove the current employees of the selection list without submitting the page to avoid duplicates.
Something similar to this: http://apex.oracle.com/pls/apex/f?p=18:307, the problem with this example is that the number of lines is predefined and initially shows all values so if I change one, it erases all existing records.
I created an example on apex.oracle.com:
Workspace: EDIAZJORGE
USER name: TEST
PASSWORD: test123
Application: 84395 - tabular
Page: 1 - home
Thank you for your help,
Erick
Hi Erick,.
As a solution, I suggest to use an element of the shuttle in a form instead of a tabular presentation. I think that its functionality to meet your needs.
Robert
Tags: Database
Similar Questions
-
Manually created the tabular forms and Firefox 4 problem
I have a tabular presentation created with pl/sql dynamic content using the apex_item Toolbox areas. A collection of the apex is used to maintain the State of the tabular data entered. It is an application originally created at the APEX 1.5 and improved over the years to 3.2. Never a problem with the application so far. I've recreated the question on the site of apex.oracle.com here:
http://Apex.Oracle.com/pls/Apex/f?p=28213
Run the application in Internet Explorer (I use 8), then run it in Firefox 4. Enter a quantity in the first element, then the next and previous then several times. See the problem? The problem doesn't occur in FF 3.6 or Chrome either. I have not tried Safari as my mac at home and I'm at the office.
Here's the code for areas of pl/sql and the update of the collection (after submitting). Page 2 is just a selection of the collection report. I spent a day trying to solve this problem. Any help will be appreciated. Redesign without pl/sql dynamic regions is not an option at this time.
Dave
Report region 1: (there is no collection)
declare
Other1 varchar2 (2000) value default null;
other_char varchar2 (32000) value default null;
Start
HTP.p ("< table border ="1 "width =" 100% "> '");
HTP.tablerowopen;
HTP.p ('< th > Description < /th > < th > price < /th > < th > quantity < /th >');
HTP.tablerowclose;
for rec in (SELECT id, description, to_char(price,'$9,999.99') price
FROM foodbev_items by id) loop
Select apex_item.hidden(1,rec.id) in the double other_char;
HTP.p (other_char);
Select apex_item.hidden(3,rec.description) in the double other_char;
HTP.p (other_char);
HTP.tablerowopen;
HTP. TableData (Rec.Description);
HTP. TableData (Rec.Price, 'right');
-quantity here
Select apex_item.text(6,null,5)
in double other1;
HTP. (Other1) TableData;
HTP.p ("< tablerowclose >" ");
end loop;
HTP.p ("< /table >" ");
end;
Report region 2: (collection exists)
declare
Other1 varchar2 (2000) value default null;
other_char varchar2 (32000) value default null;
Start
HTP.p ("< table border ="1 "width =" 100% "> '");
HTP.tablerowopen;
HTP.p ('< th > Description < /th > < th > price < /th > < th > quantity < /th >');
HTP.tablerowclose;
-collection BREAKFAST_SELECTION
--
-1 is item_id, 3 is description 6 is Qty.
--
for rec (item_id SELECT a.c001, description, price, a.c006 entered_qty to_char(b.price,'$9,999.99') a.c003
Htmldb_collections a, foodbev_items b where a.c001 = to_char (b.id) and a.collection_name = 'BREAKFAST_SELECTION"to order by b.id) loop
Select apex_item.hidden(1,rec.item_id) in the double other_char;
HTP.p (other_char);
Select apex_item.hidden(3,rec.description) in the double other_char;
HTP.p (other_char);
HTP.tablerowopen;
HTP. TableData (Rec.Description);
HTP. TableData (Rec.Price, 'right');
-quantity here
Select apex_item.text(6,rec.entered_qty,5,5)
in double other1;
HTP. (Other1) TableData;
HTP.p ("< tablerowclose >" ");
end loop;
HTP.p ("< /table >" ");
end;
Collection update:
declare
la_cks wwv_flow_global.vc_arr2;
other_char varchar2 (2000) value default null;
other_char1 varchar2 (2000) value default null;
Start
htmldb_collection.create_or_truncate_collection ('BREAKFAST_SELECTION');
because me in 1... htmldb_application.g_f01. Count
loop
--
-1 item_id, 2 is digital price, 3 is description, 6 Qty
--
--
() htmldb_collection.add_member
p_collection_name = > 'BREAKFAST_SELECTION ',.
p_c001 = > htmldb_application.g_f01 (i),
p_c003 = > htmldb_application.g_f03 (i),
p_c006 = > htmldb_application.g_f06 (i)
);
end loop;
end;don't know if this is the problem or not, but
... htp.tabledata(other1); htp.p('
'); end loop; htp.p(''); ... should be
... htp.tabledata(other1); htp.tablerowclose; end loop; htp.p(''); ..
Thank you
Janet Tyson
-
problem with checkbox on the tabular form
(All my friends at the time of deperate) Hi,
I have a tabular form on a page, which I use for adding record only. So it always shows me a blank line, which is ready to be inserted after the user has filled in the data and click on the "submit" button.
Now, I have a field check box on this form of table. Since all the columns that I show as null, I also shows this check box cleared when page appears. This is the query for the region of origin of this form:
SELECT "Customer", null
NULL "currency."
HTMLDB_ITEM. CheckBox(40,'YES',null) critical_box,
OF the double
I used the 'YES' as return value of this checkbox (when the user checked, otherwise I guess that's not equal to 'YES').
I have my own update process, which gets triggered when clicking on 'submit '.
It's my insert clause in this update process:
INSERT INTO table1
(customer, currency, critical_level)
values
(APEX_APPLICATION.g_f01 (i), APEX_APPLICATION.g_f02 (i), decode (APEX_APPLICATION.g_f40 (i), 'YES', 'YES', 'NO')
Now the problem is that when I click on checkbox and save it, it adds record correctly. But when I click on check box when you insert, I get error message no data available. It must insert 'NO' for the 3rd column when the check box is not clicked.
Please help here. Not sure why its not giving no data found error when unchecked the checkbox on the form of tables.
Thank you and best regards,
Rave.Sorry, this one is out of date, try this
http://HTMLDB.Oracle.com/pls/OTN/f?p=31517:219
Here are a few related threads you might be interested.
Re: Boxes to check off and go to the other fields in the table
Re: Problem in selecting the checkbox values
Tabular presentation - box -
Enter the name of app_user by updating the tabular form of builtin apex
Hi people,
I am a new to apex and trying to implement a tabular apex that has only an editable field box and form two audit field. Last updated by and updated, I use the built-in tabular form Apex.
Properly put form to update the field box to check and it works as it is supposed to be, the two audit field and Updated_by Update_date, I'm updating via slot table form and not updated.
Any help will be much appreciated. After the code that I use in the application process after submit
BEGIN
II in 1... APEX_Application.g_f02. COUNTY
LOOP
(ii) apex_application.g_f08: =: sysdate;
apex_application.g_f09 (II (: = v ('APP_USER');))
/*
UPDATE MG_RESTRICTION_DEV SET UPDATED_BY = v ('APP_USER')
WHERE MG_ID = APEX_APPLICATION. G_F05 (II);
*/
END LOOP;
END;
My goal is to use the max integrated apex and want to use the default MRU apex process. I get the success message, but the value does not get updated on the table.
Thank you
Shabbir
Published by: user13413381 on July 4, 2011 10:39Post this question in the forum asking Express. This is the forum of forms.
-
Show/hide the buttons on the tabular form region
I have a classic tabular form with standard buttons: AddRows, RemoveSelectedRows, cancel, Save. What I want is to have the button visible to AddRows only when there is no given on the form (the source table is empty). When the user clicks the AddRows button, a blank line apears. Right now I want to show, save, and Cancel buttons (buttons remove is covered by the current Condition). And when the user deletes all the data in the table, I want to hide all buttons except AddRows.
How to do this? Thanks in advance.Hello
If you use Apex 3.x and you have created a table by using wizard, you already have branch page.
Change this branch and add to the query field&REQUEST.
BR, Jari
-
Default values &; javascript in tabular form manual
Hello!
I have a table that shows a new line in the upper part of the report... my sql statement is in the form of:
I used to have default values defined in the report attributes but those lost when I started using the approach above.SELECT NULL EMPNO, NULL ENAME, NULL MGR, NULL SAL, NULL COMM, 0 SORTITEM, 'N' STATUS, '' MD5_VALUE FROM DUAL UNION ALL SELECT...etc
How to reference the value of an element on the page, a default value for the line empty? For example, if the element: P60_EMPNO contains the employee ID for work, I want the EMPNO field in the empty line is pre populated with this value.
Also, I used to have a javascript function which ran "onkeypress" for a field in the new row, but now I don't know how to implement with the new tabular form.
Thank you!
Tammy
(currently using APEX 3.1.2)Hi Tammy!
You can replace all NULL values in the SQL statement by your default values. The only condition would be that you should have at least one field that is NULL so that the code in the process knows that the user has not completed registration. In my example, I check:
IF vSTATUS = 'N' AND vENAME IS NOT NULL THEN
Yes, as long as the status is ' only and the user has not completed the ENAME field, the record will not be created - if, however, I put a default to ENAME, IF this test would be satisfied and, therefore, a new record would be created each time the page has been sent.
What does javascript code? The APEX_ITEM. Text() function allows the inclusion of additional attributes for the INPUT tag that will be generated. See: http://download.oracle.com/docs/cd/E17556_01/doc/apirefs.40/e15519/apex_item.htm#CHDCDHJI
In my example, I have:
APEX_ITEM.TEXT(5, SAL, 7, 7, 'style="text-align:right;"') "Salary"
Which adds the attribute "style" to the issue of the STARTING salary. You could do something like that to add in "onkeypress =" javascript:yourfunction (...); » "
Andy
-
APEX 4.0 'attributes of the element' field are ignored in the tabular forms
Hello
I don't know if I should report it as a bug, but first I want to ask around to make sure I don't do something wrong.
I noticed that no matter what attribute you put in this area (under the column attributes), when APEX generates your tabular presentation it not include the attribute you entered.
For example, I create a simple tabular presentation using the wizard and then I entered 'Attributes of elements' of one of the column (which was a textfield): style = "color: red;"
This piece of code was not the case to be found in any of the source of the page.
Can someone confirm this problem? Or maybe it has already been reported?
Thank you
Published by: reggieh on March 22, 2011 10:09Hello
Idea is that make you example and let us see source.
Seems in any case there is problem. Use jQuery and add your styles after that document is ready.
Something like this page run JavaScript when Page loading$('[name="f10"]').css({"font-weight":"bold","color":"red"});
Kind regards
Jari -
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]; -
Tabular form and the value of the element
Hello people:
I certainly hope that your holidays are festive.
I have a question for you.
I have a tabular form which is filled, based on a list of selection (with the type of delivery). I placed a form on the same page (based on a table), and I would for a question to be filled as well following the list of selection even completing the tabular form. What is the best way to go about this? Calculation? I'm not sure how to do this...
Thanks for your help!
Aqua
AquaNX4 wrote:
I have a tabular form which is filled, based on a list of selection (with the type of delivery). I placed a form on the same page (based on a table), and I would for a question to be filled as well following the list of selection even completing the tabular form. What is the best way to go about this? Calculation? I'm not sure how to do this...
If the selection list submits the page then you can set the value of the element using a calculation after the presents. Make sure that it will not be reset by any statement of process or branch of State later clear session.
-
Weird problem with the width of the selection list
4.1.1
Hello
I got a selection list filter that has three values null, Y and n. based on what the user selects a tabular presentation is filled with data that also has a list of selection.
Now, earlier, I had only two values Y and N in the selection filter, and according to the selected option list, select tabular list would be filled as well as other areas. Select the 'tabular forms' list for all lines are the same width. When I added the Null value option in, select the filter, now the tabular form displays all of the values, however, the selection list is of different sizes according to the length of the text.
I put in the CSS Style of the selection list - width: 20px
I also tried the option element width, but still no luck, when I select Y or N to the upper filter select, selection lists appear correctly with the same width.
No idea what could happen?
Just to confirm, the problem is with the width of selection tabular list.
Thank you
Ryanryansun wrote:
4.1.1Hello
I got a selection list filter that has three values null, Y and n. based on what the user selects a tabular presentation is filled with data that also has a list of selection.
Now, earlier, I had only two values Y and N in the selection filter, and according to the selected option list, select tabular list would be filled as well as other areas. Select the 'tabular forms' list for all lines are the same width. When I added the Null value option in, select the filter, now the tabular form displays all of the values, however, the selection list is of different sizes according to the length of the text.
This seems odd. Can you reproduce this on apex.oracle.com? What browser do you use?
I put in the CSS Style of the selection list - width: 20px
I also tried the option element width, but still no luck, when I select Y or N to the upper filter select, selection lists appear correctly with the same width.
No idea what could happen?
All functionality of another column using the column Standard report basically, means the "CSS" Style property is not applied (see, for example: {: identifier of the thread = 1001577}), then the attributes of the element, link attributes etc. should be used.
Tabular controls, to use the standard approach of HTML attributes. Come in
style="display: block; width: 200px;"
in the property of the attributes of the element.
-
the tabular shapes on several tables - best way on Apex 4.2
Which is the easiest way to Apex 4.2 update/insert/DELETE with a tabular presentation on 2 related tables that do not have primary keys?
I understand how to create a view, but do not know how I handle updates/deletes/inserts with optimistic locking etc.
Thank you in advance.
Alice
user7686981 wrote:
Please update your forum profile with a real handle instead of 'user7686981 '.
Which is the easiest way to Apex 4.2 update/insert/DELETE with a tabular presentation on 2 related tables that do not have primary keys?
I understand how to create a view, but do not know how I handle updates/deletes/inserts with optimistic locking etc.
The best way is to not use the tabular forms at all. Create an interactive report related to a form of single line based on a procedure that handles the DML and you will have a better way for users to access data and a much more robust maintenance page.
If you need to use a tabular presentation, and then create a view to join the 2 tables, INSTEAD OF triggers on tables insert/update/delete according to needs and create the tabular form to the normal display.
-
To hide the field of tabular form
Dears
I want to hide the tabular form by JScript field in the APEX. can anyone help me in this matter.
Concerning
KamranHello
Please see API javascript $x_Hide
http://download.Oracle.com/docs/CD/E14373_01/apirefs.32/e13369/javascript_api.htm#CHDDAGFEKind regards
Jari -
manually assign primary key and copy to the detailed form
Hi experts,
Oracle Apex 4.2, 11g database, using windows 7.
I created a form and created automatic product no. (not only sequence) with logic and SQL. SQL query produced good wise exercise, and exercise begin from 01 July and ends 30 June each year. This means if the 07/01/2015 start it will create a new voucher No.
The main Table name is GL_PV and the columns are:
Number of PV_No
Date of PV_Date
Number of CC_code
number amount
Remarks varchar2 (100)
Created a process to submit before the calculations and validations.
The codes are
NVL SELECT (MAX (to_number (nvl(pv_no,0))) + 1, 1) AMENDMENTS
IN: P15_pv_no
OF GL_PV
WHERE pv_date
BETWEEN to_date (' 01-07-' |) (extract (year from to_date (: P15_pv_date, "dd-mm-yyyy")))
+ case when extracted (month of to_date (: P15_pv_date, "dd-mm-yyyy")) < = end of another 0, then 6-1), "dd-mm-yyyy")
AND to_date (30 - 06-' |) (extract (year from to_date (: P15_pv_date, "dd-mm-yyyy")))
(+ case when extracted (month of to_date (: P15_pv_date, "dd-mm-yyyy")) < = 6 then 0 otherwise 1 end), "dd-mm-yyyy")
and cc_code =: P15_cc_code;
and press the button when Conditions = Generate_Button
In the form of master I put the data and click on create button is working well and generating good can result.
Now that I've created a detail of my detail table is pv_detail and the columns are
pv_voucher_no
pv_date
account_code
Remarks
amount
I want to create the relationship of the master / detail form.
I tried:
- primary key and foreign key, but does not. column GL_PV table primary key (PV_NO, PV_DATE), PV_DETAIL (pv_voucher_no, pv_date) foreign key table columns: -.
- has created one for master and 2nd 2 form for details, good master shape generates but not detail of.
I want to assign pv_no, pv_date in both value table (master / detail), in other words copy value pv_no and pv_date of main table in detail table pv_voucher_no and pv_date.
Please advise how I can solve this problem.
Thank you forum oracle to solve my problems.
error report: ORA-01790: expression must have the same type of data, matching expression
Find the solution on this forum
Solution:
Attributes and the tabular form:
Change the default type = PL/SQL Expression on the function
Default = to_date(:P15_PV_DATE,'DD-MON-YYYY')
-
Adding function delete to existing tabular forms
Hi all
I have an application with several tabular forms that allow to update the data. At the time, were created the tabular forms, remove feature has not been added. But now I want to allow the user to delete records of these tabular forms. Is it possible to add features to remove the tabular forms exist rather than remove the tabular forms and recreate them?
(I use apex 4.2.)
Thanks for the help,
RN
RN,
Since you use ROWID, make sure you that ROWID is defined as a PK in the 'ApplyMRD' removal of process.
Regarding the line selector, I use apex 4.2 as well. Under tasks, you see other options such as 'Add column link' and 'add a derived column? " I encountered the same problem before. I clicked on the link 'Add a derived column' and 'Add line selector', then appeared (I don't know why). Then I could add the line selector and remove the column derived in the attributes of my report.
Hope this helps,
Brett
-
Turn off/on a tabular Form attribute depending on the value selected in another attribute
Dear Experts,
I have
1. an attribute in the form that is a select statement list containing 2 static values:
- Family
- Only
and I have
2 another attribute of tabular presentation that is display text (escape special characters, does not save the State), this attribute is also a link to another page.
My requirement is when I select the family of another select list this attribute must be enabled and when I select one it should be disabled.
Kindly help out me experts!
Thank you and best regards,
Madonna
Hey Madonna,
Please take a look at your page. I added a dynamic action that can be triggered by a change in the Type 'accompany' - selection list. dynamic action to display or hide the link 'Add family' according to the value of the selection list. the code of the dynamic action is as follows:
$('.myClass').each (function () {}
If ($(this).) Val() == 'Family') {}
$(this) .parent () .parent ().find('.open_modal').show)
} else {}
$(this) .parent () .parent ().find('.open_modal').hide)
}
})
where 'myClass' is the class that gave you to the selection list, and the "open_modal" is the class that gave you for the link.
I used a show and hide because you cannot disable a link.
I would like to know if that's what you had in mind.
Kind regards
Vincent
Maybe you are looking for
-
Time capsule with modem/router
I just got the phone with Apple support and they told me that time capsule will not work itself but he need a modem/router REQUIRED to work all time capsule. Is this true? Time Capsule is a modem/router. Why on earth someone would buy something for $
-
Waveform output n-times with DAQmx screws
Hello I want to output to an analog waveform 1 d a specified number of times. The problem is that I am converting a Labview 7.1 to 9 Labview program. To do this, the Legacy DAQ screws must be replaced with modern versions of DAQmx. The old 'AO Start
-
Power supply stopped working, COMPLETELY dismantled son-in-law PC. I reassembled the set properly with the exception of two sons that I don't know if I really need to hang or not. If they do not need hung that I don't know where they were going. A wi
-
I go to control panel, add or remove Lexmark x 2600 printer-click DELETE, nothing happens, I have IE6 on XP but use HP OfficeJet V40
-
Internet with possibility of connection DNS issues
Able to browse internet but cannot solve half of sites visited. [Window title]Windows Network Diagnostics [Main instruction]Windows cannot find the host name "books.google.com" using DNS [Content]The domain name server is maybe out of service. [Windo