I have an editable table which has a target, progress & completion percentage value. I have inut fields on the target & progress values, however I want to keep the completion percentage field calculated. When I save the table, I write the record back to the DB just fine - calculating the percentage value & writing the row back as a new record (setting previous record boolean value of IsActive to false).

I write the data back with a Create function which works correctly & the table has the correct completion value, however the editable table doesn't refresh the completion percentage value. My final assign is to set the Editable Table current ID to that of the Create action ID.

How I force this to refresh?

Hi Steve,

Though it looks strange what upon edit you are actually creating new record instead of updating exisiting one. But if that is needed in your requirement I think you just need an Refresh data and ajax refresh (in same order) before end node of your screen action.

In refresh data you will be able to select the aggrigate which you want to refresh (this should be the aggrigate you are using in your table)  so that your table gets updated data.

In Ajax refresh you can select your table so that on screen your table can be updated with the updated aggregate data.

You have to use above approach becuase you are not using usual way of implementing editable table otherwise there is no need of it.

Hi Steve,

You just need to ajax refresh the cell that contains the percentage.

Attached an example of it. I always assign "test" to attribute1.

Regards,

Marcelo

Marcelo Ferreira wrote:

Hi Steve,

You just need to ajax refresh the cell that contains the percentage.

Attached an example of it. I always assign "test" to attribute1.

Regards,

Marcelo


Thanks Marcelo,


I don't think that's working quite right yet either. When you save the row, test doesn't appear, but when you refresh the page it does. So it does save to the DB, just doesn't update the UI...


Still baffled!

Hi Steve,

Dunno what can be happening differently in your environment but I tested this one on mine and is working correctly. Test shows right away without refreshing the page.

Regards,

Marcelo

Solution

Hi Marcelo,

Ajax refresh of the cell will defenetly updated the values as you have suggested but I think in that case the new record created in the entity will not be displayed in the table record because the source aggregate of the editable table is still not refreshed neither the table records.

I might be wrong but AFAIK refresh data and ajax refresh should be the solution for this case.

Solution

Success! Thank you - I needed to refresh the data table in the preparation stage in order to link it up...

Also - for info, I'm creating new records as I'm recording progress against tasks and want to be able to chart it over time (an update would overwrite historic data).