cancel
Showing results for 
Search instead for 
Did you mean: 

Implementing Undo/Redo

Former Member
0 Kudos

Hi,

we are developing a WD4A application containing a large editable table control.

We would like to add Undo/Redo functionality to this application.

The problem is to find out in which order the User changed fields in the table.

Using the Context Change Log we can find out which cells have changed. We get the old and new value of the cell. That's great.

However, is there any possibility to find out in which order the changes were made?

Thanks,

Thomas


Accepted Solutions (0)

Answers (1)

Answers (1)

ramakrishnappa
Active Contributor
0 Kudos

Hi Thomas,

The context change log concept just works great for your requirement. AFAIK, its the best option.

Other workaround solution, you can save data of your application in memory viz internal tables upon application load, then you can revert back to original on UNDO, Its just having 2 copies of data in memory

Regards,

Rama

Former Member
0 Kudos

Hi Rama,

thanks for the quick reply!

Let me explain my problem in a little more detail.

Lets say a User makes three changes in a table control.

In the first cell he writes "A" in the second "B" and in the third "C".

After that he pushes a button in the application.

The context change log then has 3 lines (one for each change), but the order is e.g. "A", "C", "B".

For being able to implement a proper undo functionality I would need the changes in the order the user made them ("A", "B", "C"). Is there any way to find out in which order the user made the changes?

Thanks,

Thomas


ramakrishnappa
Active Contributor
0 Kudos

Hi Thomas,

I don't think it is possible to find the order in which the user has changed the values.

You can just revert back all the changed cells upon undo action. Otherwise if you try to undo a cell by cell, its going to be tricky and also as you said, sequence of changes cannot be traced.

Regards,

Rama

Former Member
0 Kudos

Thanks Rama!