Scenario
User needs to create a Transaction Saved Search for Work Orders and needs to show the Quantity of the Assembly Item (Main Line) in the same row as the Quantity of the Component Items (Item Line). Using the standard Item/Quantity fields pulls both the Assembly and Component line details in separate rows.
Main Line refers to the Header section where fields like Name, Date, Memo, Created From, etc. are located. It is in the upper section of the form or simply at the top of the Tabs.
The standard behavior of the system is:
- when Main Line = F, no value will be pulled up from the Main Line header level fields on the Work Order. Only the Line Item information will be pulled.
- when Main Line = T, the Line Item Information are hidden and the search only pulls up the Main Line header information.
Solution
To be able to use the Main Line level details like the Assembly Name and Assembly Quantity in saved searches and search formula, you need to create a Custom Transaction Line field that would store this Main Line level information.
Here are the general steps:
Step 1: Create Custom Transaction Line Field/s that would store the Main Line Level details
1.) Navigate to Customization > List, Records & Fields > Transaction Line Fields > New
2.) Enter a Label for the custom field
3.) Set the Type:
- Select Decimal Number for the Quantity
- Select Free-Form Text for the Assembly Item name
4.) Mark the Store Value checkbox
5.) Under the Applies To tab, check the box for Work Order
6.) Click Save
Step 2: Create a Workflow that would automatically set the value of the Custom Transaction Line Field/s created in Step 1
1.) Navigate to Customization > Workflow > Workflows > New
2.) Enter a Name for the workflow
3.) Set the following:
- Record Type = Transaction
- Sub Types = Work Order
- Release Status = Released
- Initiation = Event Based or Schedule
Note: Set the Event Definition or Schedule details depending on your need.
In my account, I set it to Event Based: On Create and On View or Update so it would update every time a Work Order is created or updated.
4.) Click Save
5.) In State 1 of the workflow, create a New Sublist Action Group for the Items sublist
6.) Create a new Set Field Value action that would set the value of the Custom Transaction Line field/s created in Step 1. Sample Parameters for the Assembly Quantity:
For Assembly Item Name, set the following:
- Field = Assembly Item (Line) [Created in Step 1]
- From Field:
- Record = Current Record
- Field = Assembly Item
The Workflow state should look something like this:
Step 3: Perform a Mass Update to trigger the Workflow created in Step 2
1.) Navigate to Lists > Mass Update> Mass Updates
2.) Expand the General Updates the select Work Order under Transactions
3.) Add Criteria as needed, but if you will update all existing Work Orders, you can keep this blank
4.) Click the Preview button, this will show the list of all the Work Orders to be updated based on the Criteria you set
5.) Click the Perform Update button
Notes:
- This is optional if you created a Scheduled Workflow in Step 2.
- The time the update will take will depend on the number of records to be updated.
- It is recommended to perform the update during off peak hours.
- Before performing the Mass Update, check first if there are other scripts/workflows that might be triggered.
- If you set the Workflow to Event Based: On Create and On View or Update, you would only need to perform this Mass Update once since the workflow will update the fields every time a new Work Order is created or updated.
Step 4: Use the Custom Transaction Line Field/s in in your Saved Search
1.) Navigate to Lists > Search > Saved Searches > New
2.) Select Transaction
3.) Add the Criteria:
- Type = Work Order
- Main Line = False
- Assembly Item (Custom Column) [Created in Step 1] = is not empty
- Assembly Quantity (Custom Column) [Created in Step 1] = is not empty
4.) In the Results tab, add the following:
- Document Number
- Assembly Item (Custom Column) [Created in Step 1]
- Assembly Quantity (Custom Column) [Created in Step 1]
- Item
- Quantity
- Quantity Fulfilled/Received
5.) Enter a Search Title, then click Save & Run
The Results page should show something like this:
Related Threads:
-----
If you find this information useful, let us know by reacting or commenting on this post!