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
thomast
thomast7mo ago
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 object
No description
thomast
thomast7mo ago
Then you will see it in the table
No description
thomast
thomast7mo ago
Let me know if that was not the question
Ammar Ali
Ammar Ali7mo ago
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.
thomast
thomast7mo ago
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?
Ammar Ali
Ammar Ali7mo ago
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.
thomast
thomast7mo ago
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
Want results from more Discord servers?
Add your server