on 03-21-2007 3:17 AM
Hi Experts,
I have a scenario of escalation i.e., Deletion of the message details from the table of a tab when that row of details move to second tab based on status condition. I am unable to delete the escalated row details from first tab.
Can any one provide me the code..
Thanks & Regards,
Priya
Hi Priya,
Let me know whether my following assumption is right or worng !!
You have two tables in different tabs and trying to move some rows from table1 in tab1 to table2 in tab2.But you can;t able to delete the rows in table1 of tab1 ..is that correct ??
You can use wdContext.node<NodeName>().removeElement(IWDNodeElement) to delete a row from a table.
Ex :
wdContext.nodeEmployee().removeElement(wdContext.nodeEmployee().getElementAt(0));
will remove the first element from the node.
Regards,Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anil,
I need to remove the Message Details that satisfy the condition like if MsgId of Table2 of tab2 is equal to MsgId of Table1 of Tab1.. than the details of that MsgId must be removed from Table1 of Tab1.
The first row is deleted by your code.. but I need the deletion of the details that satisfy the above condition..
Regards,
Priya
Priya,
In this case you need perform compare operation between the two nodes bound to the two tables.
Try this.
for(int i=0;i<wdContext.nodeTable2().size();i++)
{
String id= wdContext.nodeTable2().getElementAt(i).getAttributeValue("MsgId");
for(int j=0;j< wdContext.nodeTable1().size();j++)
{
String id1= wdContext.nodeTable1().getElementAt(j).getAttributeValue("MsgId");
if(id.trim().equals(id1))
wdContext.nodeTable1().removeElement(wdContext.nodeTable1().getElementAt(j));
}
}
Regards,Anilkumar
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.