Scenario
User needs a list of all open/in-process work orders that shows the last completed operation and the next operation per Work Order.
Solution
This can be done by creating a Transaction Saved Search.
There is a Status field for the Manufacturing Operations which we can use in a formula to get the Min and Max value of the Operation Task Sequence.
- Criteria tab > Standard subtab
- Criteria tab > Summary subtab
Formula used:
- Latest Completed Operation (Maximum): CASE WHEN {manufacturingoperationtask.status} = 'Completed' THEN {manufacturingoperationtask.sequence}||' : ' || {manufacturingoperationtask.name} ELSE NULL END
- Next Operation (Minimum): CASE WHEN {manufacturingoperationtask.status} = 'Not Started' THEN {manufacturingoperationtask.sequence}||' : ' || {manufacturingoperationtask.name} ELSE NULL END
Note: Other fields can be added in the Criteria and Results tab as needed.
When the search is ran, here is how it will look like:
The Results are grouped per Work Order so the provided formula should show the latest operation that has already been completed and the next operation that is not yet started.
If the result is blank in the Latest Completed Operation column, it means that no operation has been started yet.
If the result is blank in the Next Operation column, it means that all operations have been completed already.
NOTE: The formula only works correctly if there is no sequence number of 100 or above.
When sorting strings of numbers, the ordering is based on Unicode code points, treating each digit as a character. Strings with the same leftmost digit are grouped together, hence "100" and "110" follow "10" due to their shared initial digit, '1'.
This means that if here is 100 or above sequence number, it will be sorted as (lowest to highest) 10, 100, 110, 120, 20, 30 etc.
-----
If you find this information useful, let us know by reacting or commenting on this post!