- In the DB Config app, open the WORKORDER object, create a relationship as follows:
+ Name: WOHASCOST
+ Child Object: WORKORDER
+ Where clause: workorderid = :workorderid and (actlabhrs + actlabcost + acttoolcost + actservcost) > 0
- In the App Designer, open WOTRACK, edit the "searchmore" dialog, add a new Text box
+ Attribute: WOHASCOST.WORKORDERID
+ LAbel: Has Cost
To search for Work Order which has cost, enter a value > 0 to the "Has Cost" field
If you don't like this UI with a textbox, can do the following trick to have a better user experience:
- Use SQL tool to query the WorkOrder table to find a unused field that always has a value of 1 (for example: "woacceptscharges" or "parentchgsstatus")
- In App Designer, instead of adding a TextBox to "searchmore" dialog, add a CheckBox and set the Attribute to WOHASCOST.WOACCEPTSCHARGES, set the Label to "Has Cost"
------------------------------
Viet Tran
------------------------------
Original Message:
Sent: Mon August 30, 2021 09:00 AM
From: User1971
Subject: Query for actuals via WO Advanced Search
MAM 7.6.1.2:
In WOTRACK --> Advanced Search:
I want to add a field to the More Search Fields window that would let me filter:
1. WOs that have a "positive cost".
- I.e. the total actuals cost is greater than 0
2. Or, WOs that don't have a "positive cost".
- I.e. the total actuals cost is 0 or less
Notes:
- I don't need to worry about approved vs. unapproved actuals.
- I can live with task actuals being ignored for now (although that's not ideal)
Is there a way that I can add a single field to More Search Fields that would let me filter that way?
Thanks.
#Maximo
#AssetandFacilitiesManagement