In NocoBase, When creating a new order, is it possible to show the customer’s previous order line items in a separate tab? This would allow users to easily reference what items the customer has purchased in the past.
Could you guide me on how to configure this? Any help would be appreciated!
order table example with an history tab
Hi, in the history tab you could create a table block for the orders. This would initially show all orders from the system. To make sure they only see their own orders you should adjust the data scope https://docs.nocobase.com/handbook/ui/blocks/block-settings/data-scope
In you case, the user id linked to the order should match the logged in user id. So depending on your field names something like customerID = current user ID
https://docs.nocobase.com/handbook/ui/variables#current-user
@hotemetoot I tried to show as I want to show in new order form I can only find the form for edit I can’t find the collections to add in the history tab
also I wanted to show the order line items only related to the customer we add when creating new order so we can check the history about that customer
I am not sure I completely understand your question. Is it someone from the backoffice team who is reviewing an existing order? Could you perhaps better explain the workflow?
I think what you want to achieve is indeed with a table block, where you input a data scope.
Something like Customer ID = Current popup record > Customer ID
You need to do some trial and error to get the correct filter.
But I don’t think it’s possible when you open a popup to create a new record for the customer. Is there no other place you can put the history?