I’ve got a question about hiding records. I found an older post about this:
http://forum.servoy.com/viewtopic.php?f=22&t=13319#p68697
I agree that it is the best way to do it, but there is one issue that is not mentioned there:
How do you handle references to the hidden records?
Say I have a table contacts and i’ve marked a contact as deleted. How ever I have in another table a reference to this contact, it will result on showing the ID value of this contact instead of the name. What I would like to happen is to show the name of the contact and to use styling to indicate it is a deleted record.
Any suggestions on how to accomplish that?
You are using a valuelist on the contacts table that shows the name and returns the id, correct?
When using a table filter, then also the values in valuelists are filtered away, so you can’t base the valuelist on a table anymore.
Instead you can use a custom valuelist and fill that yourself by using application.setValueListItems(). To get the data, you can just use databaseManager.getDataSetByQuery(), the filter isn’t applied to that function.
Another option is to use a global method valuelist.
In a valuelist you can style the display values using html.
hi joas,
i’m indeed using valuelists.
How can I detect that the item is not in my list and create the correct query so only the deleted record that needs to be shown is in my result? ie there are 100 deleted records and I only want the one that needs to be shown included?
Jos
can’t you use a fallback valuelist that just has them all?
(or a global method valuelist where you query the display value when ask for a real value)