Display specific data in table based on some check.
I want to display specific data like having isDeleted false in table. is there any option for that as i don't want to change reuseable recordIndex components that are already working.
7 Replies
Hello @Ammar Ali, to be sure to understand, you want to add a new field
isDeleted
on some objects?
If yes, for example add a custom field on an existing objectThen you will see it in the table
Let me know if that was not the question
Hi @thomast i already have a field through migrations isDeleted. now i want to display only those data in tables whose isDelete value is false in database. you can say a kind of soft delete.
So you have isDelete field available in your table already? You can simply filter on isDeleted in the view (Filter button up right in the second screenshot)
You can also first create a new view (the arrow up left new to All Companies) that you would call "Companies not deleted" for example. And then you add the filter and save the view
By "created through migrations" you mean that you are self-hosting and have added a isDelete field on all objects? If yes I can show you a solution by code
Hi @Ammar Ali , may I close this issue?
Hi @thomast yes it's a selft hosted code. Please show me the solution for it to display only those data whose is Deleted value is false.
In the hook useFindManyRecords (https://github.com/twentyhq/twenty/blob/main/packages/twenty-front/src/modules/object-record/hooks/useFindManyRecords.ts) I would simply add a default filter with isDeleted false
GitHub
twenty/packages/twenty-front/src/modules/object-record/hooks/useFin...
Building a modern alternative to Salesforce, powered by the community. - twentyhq/twenty