Urgent: FORMS-III Deleting Multiple Records By Marking X
Deleting Multiple Records By Marking X
In Forms III, i need to delete multiple records by marking X (in non database Item)
i.e.
========================
D Empno Ename Deptno
========================
X 10001 ABC 10
10002 DEF 10
X 10003 GHI 20
X 10004 JKL 20
=======================
How To Do????????????
Rgds,
Rashad
Create a button say lable "delete" in a block other than the block from where u want to delete records.
suppose the block's name is emp_blk
now create a WHEN-BUTTON-PRESS trigger for delete button and write the following code
begin
go_block('emp_blk');
first_record;
loop
if :emp_blk.d ='X' then
delete_record;
end if;
if :system.last_record='TRUE' then
exit;
end if;
next_record;
end loop;
end;
filnally commit on save.
Similar Messages
-
Deleting multiple records via html checbkoxes?
I'm trying to delete multiple records in a table based on the
selection of checkboxes.
I have an html form with 4 checkboxes. If a user checks any
box, I want to delete the associated records. and if they ucnheck
something I want to insert multiple records. This form does not
hold the primary keys but other unique parameters. Here is my sql
statement.> and that keyword is not mentioned in the DELETE
statement chapter.
IN is not specific to DELETE statements. It can also be used
with SELECT or UPDATE statements. It is a way of specifying
multiple values in a single statement, instead of using multiple OR
statements:
http://www.w3schools.com/sql/sql_in.asp
Since you are using cfqueryparam, you also need to use
list="true" (ie you are passing in a list of values, not just one)
<cfset listOfValues = "1,2,5,6,8">
WHERE ColumnName IN
<cfqueryparam value="#listOfValues#" list="true"
cfsqltype="..."> -
Delete multiple record in tabular with check box.
Hello guys,
I need your suggestion..
I have master detail block. (INSTRUCTOR and SECTION)
At detail block, I add check box item (name: RB_SECTION_ID) with Database Item "No", and value when check :SECTION_ID (on the property).
I make a button DELETE. The trigger was DELETE from SECTION where section_id = :SECTION.RB_SECTION_ID and
instructor_id = :INTRUCTOR.INSTRUCTOR_ID;
but It not work.
How we delete multiple record by check multiple check box then click DELETE button..??
Regard.
Nia..You datablock in the form cannot automaticaly refresh the changes you make with the SQL statements.
For that you need to explicity call certain built-ins to refresh the data
execute_query(no_validate) --> fetches the available data for that session. Here you deleted some records, so those records will not be available until you do a rollback in the same session(i.e, you exit the form without saving). But until you save, those deleted records will be avaiable for the users in other sessions)
Also, your code works only because the records you deleted are all already saved ones.
So it will be a good practice to use built-in of form builder rather than DML stmt.s
Here you can do like this
begin
go_block('TRY_TABLE');
first_record;
loop
if :TRY_TABLE.CCKBOX = 'Y' THEN
delete_record;
END IF;
NEXT_RECORD;
EXIT WHEN :SYSTEM.LAST_RECORD = 'TRUE';
END LOOP;
END;
If your code is like above one, you can revert your deletion by simply giving a F7 (enter-query) and F8 (xecute query). -
hi all,
Can any tell tell me how to delete multiple records in table control of a screen
i have checked the multiple rows in table control attributed and assigned a name.I needhelp in writing code.
Thankshi,
As you have marked multiple fields in the table control your table control is mulple selection enabled.
<b>PROCESS AFTER INPUT.</b>
loop at IT_CONF.
field X_CONF-CHECK
module TC_CONF_mark on request.
endloop.
module TC_CONF_user_command.
MODULE USER_COMMAND_0102.
*this modifies the internal table with check field as X
module tc_conf_mark input.
data: g_tc_conf_wa2 like line of it_conf.
if tc_conf-line_sel_mode = 1.
clear g_tc_conf_wa2.
loop at it_conf into g_tc_conf_wa2
where check = 'X'.
g_tc_conf_wa2-check = ''.
modify it_conf
from g_tc_conf_wa2
transporting check.
endloop.
endif.
modify it_conf
from x_conf
index tc_conf-current_line
transporting check.
endmodule.
module tc_conf_user_command input.
* write code to handle table control scrolling /pageup/pagedown
endmodule
*Check the ok_code
module user_command_0102 input.
case ok_code.
when 'DEL'.
* Delete from internal table where check = X
endcase.
endmodule.
<b>PROCESS BEFORE OUTPUT.</b>
module TC_CONF_change_tc_attr.
loop at IT_CONF
into X_CONF
with control TC_CONF
cursor TC_CONF-current_line.
module TC_CONF_get_lines.
endloop.
module tc_conf_change_tc_attr output.
describe table it_conf lines tc_conf-lines.
endmodule.
module tc_conf_get_lines output.
g_tc_conf_lines = sy-loopc.
endmodule.
Thus you will delete the marked lines from the internal table in PAI and in PBO you can read the refreshed internal table without the table entries that are marked as deleted in the table control and display the same in the table control. This is another way.
Regards,
Richa -
How to Delete Multiple Records using selectbox in jsf
Hi!
My Senario is I want to delete multiple records using checkbox. After selecting multiple records when i click the delete button the selected
rows shuld be deleted.if am doing like this but the edit ,delete for each row functionality is not working.
<h:selectBooleanCheckbox id ="bcb" value="#{item.empno}">
</h:selectBooleanCheckbox>
But other functionality is not wokring.
Can any one plz tell how to select the multiple records and how to send the id to the serverside.
I want code code for jsp and as well as backingBean how to accaess .
Any Reply shuld be apreciatedYou may find this article useful as well: http://balusc.blogspot.com/2006/06/using-datatables.html
Check the chapter "Select multiple rows" for two generic ways to select multiple rows in a datatable. -
How to build forms which retrieve multiple records
Hi everyone,
I am newbie to APEX.I have a question in FORM building in APEX.In oracle FORMS(6i) has the capability to search with any fileld on it . there is
an option to search
data with the id or department or name field.If it retrieves more than one record there
is navigation controls to move from one record to another.
Can we build same kind of FORMS in APEX .I didnt find any wizard to build such kind of
FORM which has both inserting and querying capability.
I found one option for that in apex (FROM with report).In the report section i can query
for the records and link to FORM which populates all the data in the FORM. Is that the
only option do we have in APEX to build the forms which gives multiple records as
output.
anyone plz help me in solving this
thank ucan anyone please help me in solving this issue,
Is it possible to build such kind of forms with retrieves multiple records in APEX.
Thanks -
Delete Multiple Records from Item Master
Hi,
We received wrong master data which has been uploaded and two groups have to be deleted. All the items in those particular groups have also to be deleted. Can anyone suggest how to delete multiple records from Item Master?
Currently I am navigating through each Item and doing a Right Click + Remove. It is very painful given the huge number of records.
Regards
SudattHi Sudatt.....
I recommend you not to run any kind of delete or update SQL query as it harms DB.
You can create your own front end application with the help of any technical consultant which can be
achieved very easily. Else such problems create a big problem during upgradation to next version.......
Regards,
Rahul -
Need to delete multiple records at a time
Hi,
My requirement is to delete multiple records at a time, i am using JDV11g and read only ADF table and rowSelection="multiple".
i have taken command button and invoking the below method.
RowKeySet rowKeySet = (RowKeySet)this.t1.getSelectedRowKeys();
CollectionModel cm = (CollectionModel)this.t1.getValue();
System.out.println("RowKeySet is: "+ rowKeySet.getSize());
for (Object facesTreeRowKey : rowKeySet) {
cm.setRowKey(facesTreeRowKey);
JUCtrlHierNodeBinding rowData =
(JUCtrlHierNodeBinding)cm.getRowData();
System.out.println("RowData is : "+rowData.getAttribute("ParamValue7"));
rowData.getRow().remove();
Please do need fullHi,
I don't understand what you mean by "+Please do need full+" , so I am ignoring this part. Here's a link that shows you best practices
http://blogs.oracle.com/smuenchadf/examples/
See example 134.
Frank
ps.: I suggest you bookmark the link -
Please Help! Deleting multiple record by using checkbox selected
Hello everybody,
I am a new to JSP. I really don't know how to delete multiple record by using checkbox selected and pressing submit button.
For example, deleting webmailbox letters using checkbox selected and delete button. The mail we checked will delete from the inbox.
I like to use my user account deleting system of my project like above example.
How can I do in JSP? I will very please you if you share you knowledge and code for me.
If you have URL address, could you share me for reference?
Please help me...
With Thanks and Regards,
wtdahlTake a look at this thread, I thing it answers your question quite good:
http://forum.java.sun.com/thread.jsp?thread=516658&forum=45&message=2463505 -
JSP, Data tags, How to build a form edit with multiple records
Hi, I'm using Jdev 9i.
I would like to have a JSP form where I can update, delete, insert records displayed in the same page.
I know that I can use the data tag jbo:DataEdit to do it, but it only works with a single record, I want to have several records in the same page, displayed horizontally.
The best example is a form to add items in an invoice:
Productid description quantity price
1001 xxx 10 20.00
1002 yyy 15 30.00
1003 zzz 7 10.00
Could you give some help please?
Thanks in advance.The form display is dictated by how you process the submit. I would build the form by using standard html tags. Here is another pseudo example:
<FORM ACTION="target.jsp" >
<TABLE>
<TR>
<TD>
DeptNo
</TD>
<TD>
DName
</TD>
<TR>
<%
int nRow = 0;
%>
<jbo:RowsetIterate datasource="ds">
<%
// increment the row number
nRow++;
String sDeptno = "Deptno" + nRow;
String sDname = "Dname" + nRow;
String sRowKey = "RowKey" + nRow;
%>
<jbo:Row id="myrow" action="current">
<TR>
<TD>
<input type="text" name="<%=sDeptno%>" value='<jbo:ShowValue dataitem="Deptno" />' />
</TD>
<TD>
<input type="text" name="<%=sDname%>" value='<jbo:ShowValue dataitem="Dname" />' />
<input type="text" name="<%=sRowKey%>" value='<jbo:ShowValue dataitem="RowKey" />' />
</TD>
<TR>
</jbo:Row>
</jbo:RowsetIterate>
<input type="submit" />
</TABLE>
</FORM>
NOTE: This should get you started!!! -
Delete Multiple records in Table?
Hi ..
I need to perform delete operation in my table with multiple selection.
My coding is..
for(int i=wdContext.nodeDetails2().size()-1;i>=0;i--)
if(wdContext.nodeDetails2().isMultiSelected(i) || wdContext.nodeDetails2().getLeadSelection()==i)
wdContext.nodeDetails2().removeElement(wdContext.nodeDetails2().getDetails2ElementAt(i));
When i delete first record, It works fine and multiple selection also works fine.
But when i select last record(only one) to delete, Then All the records get deleted. ???? Why this happens???
Anybody help to solve this probelm..
Thnx in advance..
Regards,
GSHi Sathish,
Store the node size in a variable then try. To avoid problems with the index, the context is executed in reverse. Suppose in a table you have 10 rows and you are deleting row 2 the after deletion of row 2 row 3 will come to row 2,row 4 will come in row 3 in this way process will be continue up to last row.
Try this.
int n = wdContext.nodeDetails2().size();
int leadSelected = wdContext.nodeDetails2().getLeadSelection();
// loop backwards to avoid index troubles
for (int i = n - 1; i >= 0; --i) {
if (wdContext.nodeDetails2().isMultiSelected(i) || leadSelected == i) {
wdContext.nodeDetails2().removeElement(wdContext.nodeDetails2().getDetails2ElementAt(i));
Regards,
Mithu -
Single Form Erroneously Creating Multiple Records
I've created a form that uses several pages, with different fields of the form on each page. The pages branch from one to the next depending on the choices made by the user, mostly using a regular select list or a radiogroup with submit. The problem I'm having is that some fields are being populated in one record on one page, and then the information entered by the user on the next page, for another column, creates a new record, so that every time a user would be finished making a complete entry into the form, multiple records have been created, with null fields in each from where those fields were populated, but in a different record. How can I make sure that only one record is created by the user each time they use this form?
Basically the way the page is designed is that there are only three main pages the user will see. 1) The login page then 2) The main menu page, and then 3) The page where they input the information that should populate the remainder of the fields in that record in the table.
The login page simply allows the user to access the menu page, and submits no data. The main menu page consists of 5 fields. Three of them are text fields, the fourth is a date field with a date picker. The fifth field is a radiogroup with submit that has 5 options which branch to 5 respective pages. Upon selecting an option from the radiogroup, these fields submit their data to the table and redirect the user to whichever page was designated by their choice.
This brings up the third page. Most of these other 5 pages consist simply of 4 fields; two required select lists, one required textarea field, and one nonrequired textarea field. Anyway, the problem occurs because instead of populating the remaining fields in the same record, each page with information to submit creates a new record.
I realize that the preceding may not be any additional relevant info., but I thought that if anything, there may be a better way to do that anyway. I thought that maybe editing the "Process" in the Page Definition could be where I need to change something, but I'm not sure how.
Right now my "Process Point" is set as "On Submit - After Computations and Validations," and my "Run Process" is set as the default "Once Per Page Visit." These settings are the same on every page on which I have fields that submit data; however, one difference I noticed is in the process editing interface for the initial menu page, the "Name" says "Insert row into USER_INPUT (table name) with a "Type" of "PL/SQL Anonymous Block", whereas all the other pages processes are named "Process row of USER_INPUT" with a type of "Automatic Row Processing (DML)." Am I even close to where I need to be looking to find the solution to this problem? Sorry for the novel I just wrote, but if there's any additional info. I can provide, just let me know. -
I need to delete muliple records from a table called
leag_leagues. I made a form on the first page and set the value of
the checkboc to the value of my id for my table. I then want to
pass it to the delete page where it deletes the record and
redirects to the delete record complete page. I am using PHP and
mySQL.
Any help would be appriciated.here is my code on the start page:
<?php require_once('../Connections/test.php'); ?>
<?php
mysql_select_db($database_test, $test);
$query_leag_leagues = "SELECT * FROM leag_leagues ORDER BY
leag_name ASC";
$leag_leagues = mysql_query($query_leag_leagues, $test) or
die(mysql_error());
$row_leag_leagues = mysql_fetch_assoc($leag_leagues);
$totalRows_leag_leagues = mysql_num_rows($leag_leagues);
//prevents caching
header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: post-check=0, pre-check=0",false);
session_cache_limiter();
session_start();
//this should the the absolute path to the config.php file
//(ie /home/website/yourdomain/login/config.php or
//the location in relationship to the page being protected -
ie ../login/config.php )
require('../config.php');
//this should the the absolute path to the functions.php file
- see the instrcutions for config.php above
require('../functions.php');
//this is group name or username of the group or person that
you wish to allow access to
// - please be advise that the Administrators Groups has
access to all pages.
if (allow_access(admin) != "yes")
include ('../no_access.html');
exit;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1" />
<title>Slippery Rock Lanes Admin</title>
<style type="text/css">
<!--
body,td,th {
color: #000000;
body {
background-color: #CCCCCC;
a:link {
color: #999999;
text-decoration: none;
a:visited {
text-decoration: none;
color: #999999;
a:hover {
text-decoration: underline;
color: #666666;
a:active {
text-decoration: none;
color: #CCCCCC;
.style1 {color: #CCCCCC}
-->
</style></head>
<body>
<table width="100%" border="0" bgcolor="#FFFFFF">
<tr>
<td width="16%" rowspan="4" valign="top"><img
src="../assets/admin_pin.png" width="125" height="570"
/></td>
<td width="84%" bgcolor="#FFFFFF"><img
src="../assets/admin_logo.png" width="541" height="56"
/></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> <a
href="adminhome.php">Home</a> - <a
href="adminuser.php">Users</a> - <a
href="adminleague.php">Leagues</a> - <a
href="calendarevents.php">Calendar</a> - <a
href="allys.php">Allys</a> - <a
href="coupons.php">Coupons</a> - <a
href="hours.php">Hours</a> - <a
href="honorroll.php">Honor Roll</a> - <a
href="email.php">Email</a> - <a
href="stats.php">Stats</a> - <a
href="../home.php">View Site </a></td>
</tr>
<tr>
<td height="470" valign="top"
bgcolor="#FFFFFF"><form id="deleterecords"
name="deleterecords" method="post"
action="deleteleagueconfirm.php">
<table width="700" border="1">
<tr>
<td width="24"><div
align="center"></div></td>
<td width="49"><div
align="center">ID</div></td>
<td width="300"><div
align="center">Name</div></td>
<td width="153"><div align="center">Start Date
</div></td>
<td width="152"><div align="center">End Date
</div></td>
</tr>
<?php do { ?>
<tr>
<td><div align="center">
<input name="id" type="checkbox" id="id[]"
value="<?php echo $row_leag_leagues['leag_id']; ?>" />
</div></td>
<td><?php echo $row_leag_leagues['leag_id'];
?></td>
<td><?php echo $row_leag_leagues['leag_name'];
?></td>
<td><?php echo $row_leag_leagues['leag_startdate'];
?></td>
<td><?php echo $row_leag_leagues['leag_enddate'];
?></td>
</tr>
<?php } while ($row_leag_leagues =
mysql_fetch_assoc($leag_leagues)); ?>
<tr>
<td colspan="5"><div align="right">
<input type="submit" name="Submit" value="Delete Records"
/>
</div></td>
</tr>
</table>
</form> <p></p></td>
</tr>
<tr>
<td valign="top" bgcolor="#FFFFFF"><div
align="right" class="style1">This Web Site Is Powered By Myth
Tech Administration Technologies </div></td>
</tr>
</table>
</body>
</html>
<?php
mysql_free_result($leag_leagues);
?>
And here is my code for the delete page:
<?php require("../config.php") ?>
<?php
$con = mysql_connect("localhost",$username,$password);
if (!$con)
die('Could not connect: ' . mysql_error());
mysql_select_db($db_name, $con);
if(isset($_POST["id"])) {
$delete = implode(",",$_POST["id"]);
$query = sprintf("DELETE FROM leag_leagues WHERE leag_id IN
(%s)",$delete);
mysql_query($query);
?> -
Delete multiple records with MDM WebService
Hi everyone!
I'm using an MDM Web Service with delete functionality. It identifies records to be deleted either by internal ID or by defined field value. The point is that i need this web service to delete all records with one specific value in specific field (lets say all the records with value "hidden" in field "VISIBILITY").
But when I try to map value "hidden" of the field "VISIBILITY" to the web service input in BPM it says in tracing that there are multiple fields with that value in the table (certainly there are) and that it can't process them. Cause it doesn't support multiple processing. Is there any way to do that?
Thanks in advance,
PeterHi Peter,
I guess you can do that if you first retrieve the internalIDs of the to be deleted records:
Do a search for the records with the field value.
Then you will receive the internalIds of them.
Then you can put these internalIds to the delete records webservice. Each in a new element of the record identification.
I hope this helps!
Best regards,
Stefan Brauneis -
Deleting MULTIPLE recorded programs
Ok so what happened?? At first I had to delete each program individually and then for a while all I had to do was click on the folder and it gave me the option to delete all of the recordings in that folder at once. Today I noticed it has gone back to making me delete each recording individually. WTW??? I like the option of deleting multiple recordings at once. :-( What happened and can i make it go back?
I just tested the folder delete and if you delete the folder it will put each show individualy into the deleted area. If you want to empty out the deleted area you would then need to delete each show from the folder individually.
Maybe you are looking for
-
TV and ipod version of same show - itunes is confused
I have an EyeTV and I record many HD PBS shows off air. I export the shows twice, once to TV as a 960x540 H.264 file and once to the ipod as a 640x360 H.264 file. I end up with two shows with the same name and the library view in iTunes makes no dis
-
Best way to view Text files from Mac on iPhone 4?
What is the Best way to view Text files (loaded) from my Mac onto my iPhone 4? Will any of the "readers" (e.g. Kindle, Kobo) allow me to put my own text files onto my iPhone and read them easily? Thanks
-
Contact Center Simulator - Authorization
Hi, we have activated contact center simulator, however when we try to run it in the BCB/CCS administration page, we can't login and get "Cannot authenticate the user" message prompted. any lead is really appreciated. thanks JD
-
I would like to know if it is possible to use any of the tabs to not only be a link to display it's content, but display it's content only after arriving at a page that it jumps to when clicked from another page? Let's say you're on the home page and
-
How to turn off Info records in MM - Urgent
Hi, I work primarily in SRM (We are on SRM 5.0 Extended Classic Mode). Currently we are having issues related to 2-way match POs for a certain vendor (No Goods Receipt). From SRM side the PO has only Invoice required checked but when the same PO is