table filter

Hi!

We applied a table filter

databaseManager.addTableFilterParam(DB_SERVER_NAME, null, "isdeleted", "^||=", globals.falseValue, FILTER_DELETE);

for records that has isdeleted flag = 1. We have an action to mark the record as deleted but the filter did not exclude the record that was marked as deleted. How will the filter get refreshed or something into that effect.

Please advise.

We have 2 ways in deleting records. First is via list view and second is detail view.

The

databaseManager.addTableFilterParam(...)

is done onsolutionopen.

After setting the isdeleted to 1, the foundset.getSize() did not change. If the form is in list view, it should exclude the “isdeleted=1” record. Hence if in detail view,. go to the next record.

Rogel,

The table filters are only used when data is read from the db.
When you save data, the filters are not used to check if the data still matches the filter.

Rob

rgansevles:
Rogel,

The table filters are only used when data is read from the db.
When you save data, the filters are not used to check if the data still matches the filter.

Rob

Hi Rob, is there a way to trigger it so the foundset can be refreshed?

rogel:

rgansevles:
Rogel,

The table filters are only used when data is read from the db.
When you save data, the filters are not used to check if the data still matches the filter.

Rob

Hi Rob, is there a way to trigger it so the foundset can be refreshed?

Would there be a drawback of using

databaseManager.refreshRecordFromDatabase(foundset,-1)

or

databaseManager.refreshRecordFromDatabase(foundset,foundset.getSelectedIndex()

HI Rogel,

I asked the same to Rob about this, and yes refreshFromDatabase does work oke, but there is one bug.
When we do this, the selectedIndex jumps back to 1…

I filled a bug report with an example for this in the servoy jira support system

for now you can work around this, by first getting the selectedIndex, do a database record refresh, and set the index back…