Hello Listers,
ARS 7.6.03
SQL Server 2005
Windows Enterprise on a VM

I have been experimenting with table run process commands.
The scenario:
I have two tables on a form. One is populated with records the other is empty.
The populated table has a select button in the first column. Pressing the 
button on a record removes the row from the first table and makes it appear in 
the second (empty) table.
Works just as I had hoped. Now I want to have an UNDO button on the second 
table to put the record back if it came over by mistake. This almost works.

I pass the row number when I move the record from table1 to table2 along with 
the record.
When I execute the UNDO AL it performs Run Process PERFORM-ACTION-TABLE-ADD-ROW 
987651050 $ROWNumb$
Where 987651050 is table1 and $ROWNumb$ is the value passed in from table1 
during the selection process.

What happens here is that table1 gets a new row at the bottom as if $ROWNumb$ 
is blank. But I also included a bit of workflow that SETS and integer field on 
the form with $ROWNumb$ and that has the valid number. In this test case table 
one has its 5 rows with 4 of them displayed. After the UNDO I have 5 rows but 
the last row is blank and row number 4 gets its data written to table1.
Seems to me that the ADD row process is not picking up the $ROWNumb$ value for 
the ADD action but it is selecting row $ROWNumb$ when I do the set fields.

Confused? So am I.
Maybe a diagram could help.
Before the Select action
Table1                                  Table2
|  SELECT  | TEXT         |             |  UNDO    | TEXT | ROWNumb |
| [button] | 1st text item|
| [button] | 2nd text item|
| [button] | 3rd text item|
| [button] | 4th text item|
| [button] | 5th text item|

After the select action RUN Process to add a row Table2 Set fields from 
highlighted row in table1 and Run Process to delete the row from table1.

Table1                                  Table2
|  SELECT  | TEXT         |             |  UNDO    | TEXT          | ROWNumb |
| [button] | 1st text item|             | [button] | 4th text item |   4     |
| [button] | 2nd text item|
| [button] | 3rd text item|
| [button] | 5th text item|

After the UNDO action. Run Process to ADD a row in position $ROWNumb$ to table 
1 and set fields from table2 to table1 in the indexed row $ROWNumb$.

Table1                                  Table2
|  SELECT  | TEXT         |             |  UNDO    | TEXT          | ROWNumb |
| [button] | 1st text item|
| [button] | 2nd text item|
| [button] | 3rd text item|
| [button] | 4th text item|
| [button] |              |

So instead of original row 5 getting pushed down one it gets overwritten.
Am I thinking this wrong? Should I not do the ADD back to table1 since the row 
is still there and just not visible?

And I can't just refresh table1 because there could be two items pushed to 
table2 and only one gets undone.

Any guidance on this work be greatly appreciated.

Thank you,
--- 
John J. Reiser 
Remedy Developer/Administrator 
Senior Software Development Analyst 
Lockheed Martin - MS2 
The star that burns twice as bright burns half as long. 
Pay close attention and be illuminated by its brilliance. - paraphrased by me 

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
"Where the Answers Are, and have been for 20 years"

Reply via email to