Filtering a dropdown

Hello, I have a popup which displays details of an order record. So there is a dropdown which displays the order status(New, Accepted, Delivered, Dispatched) and all this are from an option set. I would like to filter the dropdown whereby if the order status is changed to accepted then New option is removed from the dropdown, when dispatched is selected then New and Accepted are removed also from the dropdown.

On dropdown set condition, depending on condition change the source, and lamit the Option set if you know the order,

like

1 : New
2: Accepted
3: Delivered
4 Dispatched

Now

if the the order is accepted make on the souce choose the Optionset and choose item from 2

1 Like

Hope it solved it, if not ping me, its very simple fix.

Donā€™t do that, because itā€™ll break when you add a new option.

Two approaches:

  1. Add a conditional data source when Order Status is Accepted. Set data source to All Options:minus item New. Same for when order status is Dispatched - data source All Options:minus item New:minus item Accepted.

  2. Have an attribute called ā€˜Valid Status Changesā€™ on the option set. The field type should be List of Statuses. These are the list of options that can be displayed for each option. For example, for ā€˜Acceptedā€™ set the attribute to Delivered, Dispatched. For Dispatched, set it to Delivered. Essentially, for each option, make the List of Statuses attribute the list of statuses that a user should be able to update it to.

Iā€™d probably go with number 2 as Iā€™m a future-proofing evangelist and it makes it easy to add new order statuses in future. 1 will be slightly quicker to build.

1 Like

Thank you, well I tried out the second option

Yeah it did solve, thank you. I initially did the first option seems like I did put the condition on. Thanks

As @georgecollier suggested, you can also do this, but in this case if you need to add a option set, and you dont want to show it depending on each senario, you have to minus it.

so i guess in both case there are some extra work whenever we add OP,

This is one of the reason i always plan my DB and OP as much as i can, before i even touch my workflow.