# Adding a Method Directive to Labor.EndActivity

**URL:** <https://www.epiusers.help/t/adding-a-method-directive-to-labor-endactivity/96262>\
**Category:** Epicor ERP 10\
**Tags:** method-directives\
**Created:** [November 9, 2022, 5:10pm UTC](https://www.epiusers.help/t/adding-a-method-directive-to-labor-endactivity/96262 "2022-11-09T17:10:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hvrabbit](https://www.epiusers.help/letter_avatar_proxy/v4/letter/h/eada6e/32.png) [@hvrabbit](https://www.epiusers.help/u/hvrabbit)\
**Post date:** [November 9, 2022, 5:10pm UTC](https://www.epiusers.help/t/adding-a-method-directive-to-labor-endactivity/96262/1 "2022-11-09T17:10:50Z")

</div>

I am trying to add a pop up for when an employee ends activity and enters a labor quantity of zero. The goal is to have them question if they really didn’t run any parts.

In my mind, the directive should be Post-Processing. But, when I go to test, the message pops up when I click on the End Activity button in MES. I was hoping there was a way to have the message pop up when the employee clicks OK to end their activity. I tried Base Processing, but that just greyed out the labor quantity field and produced an error.

 ![image](https://www.epiusers.help/uploads/default/original/3X/6/c/6cb2111569d23c0fffc468e10d53d33308b511ee.png)

---

<div class="post-metadata">

**Author:** ![gpayne](https://www.epiusers.help/user_avatar/www.epiusers.help/gpayne/32/55751_2.png) [@gpayne](https://www.epiusers.help/u/gpayne)\
**Post date:** [November 9, 2022, 6:18pm UTC](https://www.epiusers.help/t/adding-a-method-directive-to-labor-endactivity/96262/2 "2022-11-09T18:18:06Z")

</div>

@hvrabbit I think pre processing on Labor.Update for an updated row that has a clockout time that is not 24 will do what you want.  
It will still end the activity unless you never want zero, but that could be a problem if they are on the wrong operation.

---

<div class="post-metadata">

**Author:** ![jgiese.wci](https://www.epiusers.help/user_avatar/www.epiusers.help/jgiese.wci/32/51553_2.png) [@jgiese.wci](https://www.epiusers.help/u/jgiese.wci)\
**Post date:** [November 9, 2022, 6:32pm UTC](https://www.epiusers.help/t/adding-a-method-directive-to-labor-endactivity/96262/3 "2022-11-09T18:32:22Z")

</div>

You want Labor.Update pre-processing. Create an initial condition where LaborType is P and the row is updated, and EndActivity is true.

If you report qty under setup then skip the LaborType condition but that would be weird.

---

<div class="post-metadata">

**Author:** ![hvrabbit](https://www.epiusers.help/letter_avatar_proxy/v4/letter/h/eada6e/32.png) [@hvrabbit](https://www.epiusers.help/u/hvrabbit)\
**Post date:** [November 9, 2022, 7:32pm UTC](https://www.epiusers.help/t/adding-a-method-directive-to-labor-endactivity/96262/4 "2022-11-09T19:32:42Z")

</div>

I’m new to this so bear with me… I set up these 2 conditions and I’m still getting the pop up when end activity is clicked. My table is Labor.Update.

 ![Screenshot 2022-11-09 133027](https://www.epiusers.help/uploads/default/original/3X/a/5/a5bc3bf502e4d764e985d087f71f5018bf158494.png)  
 ![Screenshot 2022-11-09 133015](https://www.epiusers.help/uploads/default/original/3X/7/e/7e9fbee6441c46c65c06e7a8f27bd98cac0e8f25.png)

---

<div class="post-metadata">

**Author:** ![jgiese.wci](https://www.epiusers.help/user_avatar/www.epiusers.help/jgiese.wci/32/51553_2.png) [@jgiese.wci](https://www.epiusers.help/u/jgiese.wci)\
**Post date:** [November 9, 2022, 7:43pm UTC](https://www.epiusers.help/t/adding-a-method-directive-to-labor-endactivity/96262/5 "2022-11-09T19:43:33Z")

</div>

A BPM will only fire when action is taken. You just want to capture that event and give them options before allowing the save to continue. If you want to ask them to enter a value or leave it 0, but just double check with them what their intent is you will need to use a BPM form for that.

---

<div class="post-metadata">

**Author:** ![alvdan88](https://www.epiusers.help/user_avatar/www.epiusers.help/alvdan88/32/48273_2.png) [@alvdan88](https://www.epiusers.help/u/alvdan88)\
**Post date:** [January 15, 2023, 6:29am UTC](https://www.epiusers.help/t/adding-a-method-directive-to-labor-endactivity/96262/6 "2023-01-15T06:29:27Z")

</div>

Don’t know if you’ve got your solution yet, but I accomplished something similar in the Application Studio for End Activity, except for the Labor Notes. We require notes to be entered since we have gone 100% E traveler. If the field is left blank, then it pops a error, and re-focuses on the Labor Notes.

If you think this would work for you, I can explain further.
