Ajax Refresh after ListRemove throws error "Index of out range"

Hi OS Team

I am using editable table in which I have attributes: 

Lower Limit : Calculated

Upper Limit: Entered by user and saved in DB

Percentage: Entered by user and saved in DB

On UI, the editable looks like 

Properties of the table are: 

While showing the values in editable table on preparation, I am using aggregate on DB.

To save to the db from the table, I am saving values from the "CommissionScheduleLineList" List (which is a list of the table in db).

Lower Limit is calculated as:

If(CommissionScheduleLineTable.List.CurrentRowNumber <=  0 or
CommissionScheduleLineTable.List.CurrentRowNumber > CommissionScheduleLineList.Length, FormatDecimal(0.00,2,".",","), FormatDecimal(CommissionScheduleLineList[CommissionScheduleLineTable.List.CurrentRowNumber-1].UpperLimit + 0.01,2,".",","))


In "OnCommissionScheduleLineDelete" screen action as shown below, I am removing the row from the list with the properties shown below. Then The "lower limit" after the deleted row does not get calculated and shown on UI.

If I add a Ajax Refresh on the container having the table, I get an error "Index of out range"

I hope I have explained the problem clearly, please let me know if you need more information.



Hi Nitish,

Editable Tables are straaaange things...

They keep an extra line to be able to add a new line to the table, but mess with the line counter, so this line do not appear. But this does not work very well, specially when using Ajax Refresh... So, using the Length of the list can be very problematic...

In any case, I think you shouldn't remove the item from the list. This is done automatically by the EditableTable when you delete it.
The action is called to warn you from this event, so that you can, for example, remove the record from database.

As far as I know... (Didn't worked very much with Editable Tables)

Eduardo Jauch

Hi Nitesh,

Can you please send your OML?