In order to allow me to focus on Consulting (click here) and Courses (click here), I continue to review all posts here in the Forums, but, in general, I'm only personally responding to posts that I mark as #AcumaticaTnT (click here). For Questions (click here), others may respond, or you can post over at Community.Acumatica.com (click here).
Questions Cannot filter TimeCards based on EPTimeCard.TimeCardType in GI
I have a Generic Inquiry where I want to only see values for current timecards, not the timecards that were later replaced by a corrected one.
For this there is a field EPTimeCard.TimeCardType which should be 'Normal', 'Normal Corrected', or 'Correction'. I would need to ignore the 'Normal Corrected' timecards.
So I create my GI with a condition set to: EPTimeCard.TimecardType, DOES NOT Equal, From Schema is ticked, 'Normal Corrected' is selected from the available items in the dropdown.
The filter is completely ignored. Looking at the WHERE clause generated in the trace shows:
WHERE ( `EPTimeCard`.`Status` = 'R' AND `EPTimeCardItem`.`InventoryID` = 1094 AND 1 = 1)
The last condition (1 = 1) is what happened to my TimecardType conditon, clearly not what I wanted.
Does anyone know how to achieve this?
I hope my response is helpful.
a GI my team wrote for Time Cards is quite complex - so we ended up creating a customization with a view and a DAC.
but in the process of filtering, we ended up using a Group by
and selecting the MAX record from the group. We employed this method because a employee can not ever have more than 1 time card for a time card period (however you have that configured). So the MAX time card is always the most recent.
The Customization creates the View and DAC (the client is on SAAS) and the GI references the DAC.
Best of luck -