remove selected customers from reference set selector
I posted yesterday a problem using a reference (set) selector, thanks Mike for the quick solution. However i now run into a new problem with the case where i have a customer enitiy and a order_status entity with says somehting about the customer I've made a new/edit page where i have put the enumeration and the reference set selector. So when i run the script i can select the new made customer from the reference set and change its status with the enumeration. Now i face the following problems: First i would like the new made customer to be removed from the customer list when he is selected via the reference set selector. So if i have changed the status of the customer through the enumeration and then would press add again to change the status of another customer. The first customer is no longer available in the customer list, nor is it visible in the new/edit customer tab. Also when a customer is approved or declined i'd like a tekst pop up to appear where i can put a message. I hope you can help me again. Kind regards, Peter Schakel
To exclude those customers who have already been selected, you can use an XPath constraint on a Datagrid, Dataview, TemplateGrid, etc. For instance, if the association between Customer and OrderStatus entities is called Customer_OrderStatus, your xpath would look like this:
This will return all customers who are not associated with an Order Status.
The popup can be accomplished with an onChange microflow on the appropriate field on your form OR an EventHandler microflow on the appropriate entity. One of the Action types in a microflow is to display a message.
The entities are called Customer and OrderStatus and the association is called CustomerOrderStatus when i go to the datagrid of customerselect (the page the reference set selector selects its customers from) and at properties -> Data source -> xpath constraint i put in your not(Customer_OrderStatus/OrderStatus) it says: required (...)+ loop did not match anything at input 'not'.