Remove items from a list
This isn't so much a cold fusion question as a just a logic
question.
I have a form variable "form.list1" that contains numbers
1,2,3,4,5,6,7,8,9
I have a second form variable "form.list2" that contains
numbers as well 3, 5, 6
What I want the end result to be is a variable that contains
all of the numbers in form.list1 minus what is in form.list2, so
that would be 1,2,4,7,8,9.
I can not for the life of me figure out how to do this.
I've tried doing a nested loop list, but I can't see the
logic to make it work.
Any help would be greatly appreciated
quote:
Originally posted by:
cputnam14
The first list is generated with an output query. The numbers
represent a corresponding document type in my database.
The second list is generated from a checkbox inside the
output query.
So the query outputs documents that need to be filled out by
a user. There is an option to email the documents to the user, but
I have a check box beside each one that will omit the checked
document.
The result is a list of all the documents, and a list of
documents that don't need to be sent.
With the resulting list, I will generate an email and attach
the document to the email and send it out.
Make the query a session variable.
Then do a Q of Q on it to exclude the 2nd list.
Similar Messages
-
How do i remove items from purchased list in iTunes store?
The Purchased items in iTunes show everything i ever downloaded to my iPod.
How can i remove some of the items?
The list is way too long.
So items were downloaded to see what they do.yeah... same question from my side.....
-
Removing Items from Populated List-Box
I have a drop down box populate a list box. (change: ListBox1.addItem(xfa.event.newText)) But I can add more then one of the same selection so how do I remove them from the ListBox. Upon click? somehow? I don't konw the lingo.
There is a selectedIndex property that will give you back the index of the 1st item that is selected.
Paul -
Removing items from "Places" list
On the left-side "Devices" and "Places" dock of my desktop, I have a number of places that are 'empty shells' that ought not be there. How do I remove them? I'm running 10.6.8.
If you hold the command key down and drag them out, they should disappear.
Matt -
How can we remove items from the VF04 list?
We have a long list of items in VF04 that, for various reasons (some process related, some due to errors), are not to be billed. We have looked at applying filters to the list but there is nothing really suitable to hide these individual documents e.g. we could filter out some dates where none of the items on that date are to be billed but other dates have a mix of items we want to bill and others we don't.
I have done a search of this forum but didn't find a previous topic with a quick and simple method to remove items from the list .
Is there a method, other than billing them or sorting each issue individually, to permanently remove individual documents from the VF04 list?
Thanks in advance for any help.
DavidHi,
David,
Download a list of Pending delivers doc form VF04.
Paste the list in T.Code : VL09 (Delivery reversal) and reverse the delivery.
Then go to T.Code: VL06G Select the list of deliveries that has been reversed, select/delete all un- wanted deliveries.
This way you can remove all unwanted pending deliveries forn Billing due list (VF04).
Thanks & Regards,
R.Janakiraman -
How can i remove items from list that have been deleted when i click on them it keeps showing empty
how can i remove items from the list that have been deleted when i click on them it keeps showing folder empty
Actually, Reader SHOULD keep showing documents that no longer exist, I disagree. It's no big deal, and people will quickly realise why they can't open the file. They open more files, the old ones move off.
The REASON why it should not check is that checking whether a file exists can take a long time when things aren't good. For instance if a file server goes down, or a memory card is unplugged. That in turn would mean delays opening the File menu, and I've seen some software that can sit there for several minutes. That would really give people something of which to complain... -
JList run time errors when removing items from list
Hi there
I am having trouble removing items from a JList. For a While it was working fine and now it outputs runtime errors everytime samething gets removed from the lsit
Here is the code
//declare
public class Consumertab1gui extends JPanel implements ActionListener
public static JList conList = null;
private static DefaultListModel model = null;
// Create a list with some items
model = new DefaultListModel();
conList = new JList(model);
//set the size of cells in the list with the length of the string
conList.setPrototypeCellValue("Lenght 1234567890");
conList.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
conList.addListSelectionListener(new ValueReporter());
//set a scroll onto the list
JScrollPane conScroll = new JScrollPane(conList);
add(conScroll,c);
//when the button gets pressed to drop the selected item the following code is called
private void dropConsumer()
int selItem=0;
componentsV.comVRemove(conList.getSelectedValue().toString());
selItem=conList.getSelectedIndex();
System.out.println("No:"+(model.getSize()-1));
System.out.println("S:"+selItem);
remConList(selItem);
dropCon.setEnabled(false);
//which in turns calls this
public void remConList(int pos)
model.remove(pos);
when the model.remove(pos) code is executed the following runtime errors are given:
java.lang.NullPointerException
at Consumertab1gui$ValueReporter.valueChanged(Consumertab1gui.java:197)
at javax.swing.JList.fireSelectionValueChanged(JList.java:1321)
at javax.swing.JList$ListSelectionHandler.valueChanged(JList.java:1335)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:187)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:167)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:214)
at javax.swing.DefaultListSelectionModel.removeIndexInterval(DefaultListSelectionModel.java:546)
at javax.swing.plaf.basic.BasicListUI$ListDataHandler.intervalRemoved(BasicListUI.java:1561)
at javax.swing.AbstractListModel.fireIntervalRemoved(AbstractListModel.java:160)
at javax.swing.DefaultListModel.remove(DefaultListModel.java:478)
at Consumertab1gui.remConList(Consumertab1gui.java:38)
at Consumertab1gui.dropConsumer(Consumertab1gui.java:58)
at Consumertab1gui.actionPerformed(Consumertab1gui.java:46)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
at java.awt.Component.processMouseEvent(Component.java:5100)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
can anyone spot any mistakes in the code or suggest possible resons as to why these run time errors occur?
Thanks
alexisjava.lang.NullPointerException
at Consumertab1gui$ValueReporter.valueChanged(Consumertab1gui.java:197)The NullPointerException occurs at line 197, in the valueChanged method of your ValueReporter inner class. I have looked through your post several times but I don't see where you posted that method. Anyway, that is where you should look.
PC² -
HT5429 How do I remove items from the "current location/to" list?
In MAPS, how do I remove items from the "current location/to" list?
Hit the book icon and you will see delete all option. I have not found a way to delete them one at a time.
-
Removing items from "open a recent item" list
Hi,
I deleted some files in dreamweaver cs5, but they still appear in "Open a recent item",
how can I remove them from the list?
Thanks for any help
DavidWindows or Mac?
On Windows, it's a setting in the Windows registry:
HKEY_CURRENT_USER\Software\Adobe\Dreamweaver CS5\Recent File List
Select each file, right-click and select Delete.
Alternatively, just open up to 9 legitimate files in DW and let the list update itself. -
Removing items from itunes wish list
iTunes will currently NOT let me remove items from my wish list inside the itunes store. Even when I've selected the item to buy, it stays in my wish list... I need to remove items that have either been purchased, or that I no longer wish to buy. Thanks for the help!
Looks like it's not just you having problems : https://discussions.apple.com/thread/3093114?tstart=0
Normally pressing the 'x' on or next to the item should delete it (http://support.apple.com/kb/HT1368), but it doesn't appear to be working at the moment. -
How to remove items from my reading lists on my ipad?
how to remove items from my reading lists on my ipad?
Swipe across its name in the list and it should get a Delete button on it - tap that and it should be removed from the list
-
How to remove item from my iPhone and iPad on my reading list?
How to remove item from my iPhone and iPad on my reading list?
Swipe across its name in the list and it should get a Delete button on it - tap that and it should be removed from the list
-
How to remove an item from a list box?
Here's my previous code.
I hope someone can help me. Thanks.
public partial class frmJaialai : Form
List<Jaialai> source;
public frmJaialai()
InitializeComponent();
private void frmJaialai_Load(object sender, EventArgs e)
source = new List<Jaialai>();
private void btnAdd_Click(object sender, EventArgs e)
if (IsValidData())
int bet;
if (string.IsNullOrEmpty(txtJaialaiNumber.Text) || !Int32.TryParse(txtBet.Text, out bet))
MessageBox.Show("Must be a required field.", "Entry Error");
return;
var existingProduct = source.Where(x => x.JaialaiNumber == txtJaialaiNumber.Text).SingleOrDefault();
if (existingProduct != null)
existingProduct.Bet += bet;
else
source.Add(new Jaialai { Bet = bet, JaialaiNumber = txtJaialaiNumber.Text });
lstJaialaiNumbersList.DataSource = null;
lstJaialaiNumbersList.DataSource = source;
txtJaialaiNumber.Text = "";
// save the jai-alai numbers list on a txt file
const string sPath = @"C:\Automated Jai-alai Program\Jai-alai Numbers List.txt";
System.IO.StreamWriter SaveFile = new System.IO.StreamWriter(sPath);
foreach (var item in lstJaialaiNumbersList.Items)
SaveFile.WriteLine(item);
SaveFile.Close();
public class Jaialai
public string JaialaiNumber { get; set; }
public int Bet { get; set; }
public override string ToString()
return string.Format("{0} = {1}",
JaialaiNumber, "₱" + Bet.ToString());
private bool IsValidData()
return Validator.IsPresent(txtJaialaiNumber) &&
Validator.IsPresent(txtBet) &&
Validator.IsInt32(txtBet);Hi ,
Here is a sample about remove Item from listBox.
// listBox1.Items.Clear();// remove all
int SelItemCount = listBox1.SelectedItems.Count;
for (int i = 0; i < SelItemCount; i++)
listBox1.Items.Remove(listBox1.SelectedItem);//remove which one you selected
You also can check in MSDN
https://msdn.microsoft.com/en-us/library/aa983551(v=vs.71).aspx
Best regards,
Kristin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How to move items from one list to other
hi all,
in jsp page i have twolist boxes. i want to move item from one list to other list on click of add or move button. can u plz suggest me an answer for the above. thank u
Regards sangeetThis link should help. Remove from one list and add to the other using Javascript.
http://www.mredkj.com/tutorials/tutorial006.html -
Can't remove items from the selectMenu
I am using selectMenu as:
<a4j:region selfRendered="true" id="text">
<h:selectOneListbox id="symbol" value="#{user.name}">
<f:selectItems value="#{user.temp_list}" />
</h:selectOneListbox>
<a4j:commandButton action="#{user.getData}" reRender="symbol" value="Get"/>
</a4j:region>temp_list has following three values when page loads:
temp_list.add(new SelectItem("Sunday"));
temp_list.add(new SelectItem("Monday"));
temp_list.add(new SelectItem("Tuesday"));Now in user.getData i want to remove items one by one based on the selection made by the user. The code is:
temp_list.remove(0);
this.setTemp_list(temp_list);But the problem is that if user selects Sunday for example, it remove it from the list but next time when user select Monday it removes monday but BRING BACK SUNDAY AGAIN IN THE LIST. Why is it so?BalusC wrote:
I don´t understand you.Actually i was asking about the code which i mentioned in my last post.
Okay then what could be the solution? What my thinking is that calling list.remove actually removes the item from the list permenantly, isn't it? If so then why does it showing me again in the selectMenu?
Maybe you are looking for
-
WINDOWS ON A MAC OS X HELP!
I have windows vista installed on my macbook and can switch back and forth from using the mac operating system and that of the vista operating system. WHAT I WANT TO KNOW: Is it possible to use windows programs such as microsoft word and powerpoint w
-
I'm having problems with Notes after upgrade to OS4. Anyone else?
After upgrading mu iphone 3GS to the new OS4, I'm having serious problems with my Notes. If I edit old notes and klick Done, it now takes longer then ever to save. And when the save is finished, my latest edits are gone! The note is back to the text
-
How to rearrange single photo in grid view
This seems like a silly question, but my library was imported and one photo out of 1000 shows up at the beginning in the grid view. I'd like to move it to the correct chronological location so it fits in with all the the others. I can't figure out ho
-
Can't find Lightroom 1.3 upgrade
All the links I've found say I'm going to a download page for 1.3 (I'm on a Mac), but all I can see is 1.1 and 1.2. i.e Downloads center>Lightroom> Upgrade>Mac. All that visible are 1.1 and 1.2, even if the previous page mentions 1.3. Frustrating! An
-
What's the Best Securirty Lock for Powerbook?
I just got the new 17" PowerBook and am looking to buy the best security lock cable for it. I have read some posts before indicating some locks damaged their PowerBooks. I would appreciate your comments on your experiences and your recommendations. T