# Parameter skip if empty

**URL:** <https://www.epiusers.help/t/parameter-skip-if-empty/47938>\
**Category:** Epicor ERP 10\
**Created:** [September 19, 2018, 1:48pm UTC](https://www.epiusers.help/t/parameter-skip-if-empty/47938 "2018-09-19T13:48:38Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [September 19, 2018, 1:48pm UTC](https://www.epiusers.help/t/parameter-skip-if-empty/47938/1 "2018-09-19T13:48:38Z")

</div>

Does anyone know how to allow an empty field on a decimal or integer parameter? If the user tabs through the field, it will put a 0 in there, which obviously messes up what they are trying to filter if they don’t want to use that parameter.

 ![image](https://epiusers.help/uploads/default/original/2X/5/59fe9315dc6e9b9baf2ec0010f8b4291dc313c55.png)

![image](https://epiusers.help/uploads/default/original/2X/4/4a2e9633cef3386c1597b10423a1d7cbc3e603b8.png)

---

<div class="post-metadata">

**Author:** ![jkane](https://www.epiusers.help/user_avatar/www.epiusers.help/jkane/32/57624_2.png) [@jkane](https://www.epiusers.help/u/jkane)\
**Post date:** [September 19, 2018, 1:55pm UTC](https://www.epiusers.help/t/parameter-skip-if-empty/47938/2 "2018-09-19T13:55:29Z")

</div>

Maybe set the default value to 0.00

---

<div class="post-metadata">

**Author:** ![EpiUser](https://www.epiusers.help/letter_avatar_proxy/v4/letter/e/85e7bf/32.png) [@EpiUser](https://www.epiusers.help/u/EpiUser)\
**Post date:** [September 19, 2018, 1:59pm UTC](https://www.epiusers.help/t/parameter-skip-if-empty/47938/3 "2018-09-19T13:59:29Z")

</div>

Could set the default value to zero, then in the criteria for the table make the parameter equal to the an expression. Inside of the expression make an if statement that says if the parameter equal zero then zero else shiphead.trackingnumber. That way if it is a zero it is true but if they enter a value it does the comparison.

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [September 19, 2018, 2:14pm UTC](https://www.epiusers.help/t/parameter-skip-if-empty/47938/4 "2018-09-19T14:14:36Z")

</div>

> [@EpiUser](#):
>
> Could set the default value to zero, then in the criteria for the table make the parameter equal to the an expression.

So I got it to work except if there is null in the row. It only shows rows that have a value. In this case, there will be nulls at certain times.

 ![image](https://www.epiusers.help/uploads/default/original/2X/c/cca1ece92a2a6c0948eb8eed7b666bb7b62757d1.png)

---

<div class="post-metadata">

**Author:** ![ckrusen](https://www.epiusers.help/user_avatar/www.epiusers.help/ckrusen/32/50584_2.png) [@ckrusen](https://www.epiusers.help/u/ckrusen)\
**Post date:** [September 19, 2018, 2:16pm UTC](https://www.epiusers.help/t/parameter-skip-if-empty/47938/5 "2018-09-19T14:16:33Z")

</div>

Can the zero be backspaced over? Or does it change back to zero on clicking the OK Button?  
(guessing the change happens with an OnLeave() call)

Does the TruckNum field always have a value? Or is it sometimes null?

Maybe make a calculated field that holds the TruckNum as a string (or empty string, when null), and have your Param filter on the calc field.

---

<div class="post-metadata">

**Author:** ![ckrusen](https://www.epiusers.help/user_avatar/www.epiusers.help/ckrusen/32/50584_2.png) [@ckrusen](https://www.epiusers.help/u/ckrusen)\
**Post date:** [September 19, 2018, 2:18pm UTC](https://www.epiusers.help/t/parameter-skip-if-empty/47938/6 "2018-09-19T14:18:42Z")

</div>

And did you take a screen shot of the screenshot?

 ![image](https://epiusers.help/uploads/default/original/2X/a/abe8706c934203896c0da2e1b203412161b6bdfa.png)

🙂

---

<div class="post-metadata">

**Author:** ![EpiUser](https://www.epiusers.help/letter_avatar_proxy/v4/letter/e/85e7bf/32.png) [@EpiUser](https://www.epiusers.help/u/EpiUser)\
**Post date:** [September 19, 2018, 2:20pm UTC](https://www.epiusers.help/t/parameter-skip-if-empty/47938/7 "2018-09-19T14:20:21Z")

</div>

should it be:  
(Case when @TrackNum = 0 then @TrackNum else UD04.Num\_c)

This way if its a zero then it will always be true, it will only look to do a comparison if a value is entered.

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [September 19, 2018, 2:27pm UTC](https://www.epiusers.help/t/parameter-skip-if-empty/47938/8 "2018-09-19T14:27:54Z")

</div>

> [@ckrusen](#):
>
> Can the zero be backspaced over? Or does it change back to zero on clicking the OK Button?  
> (guessing the change happens with an OnLeave() call)

It cannot be cleared.

> [@ckrusen](#):
>
> Does the TruckNum field always have a value? Or is it sometimes null?

Sometimes null.

> [@ckrusen](#):
>
> Maybe make a calculated field that holds the TruckNum as a string (or empty string, when null), and have your Param filter on the calc field.

That’s what I am thinking that I would have to do. Seems like a lot of messing around to get epicor to do what it looks like it should do out of the box…

> [@EpiUser](#):
>
> should it be:  
> (Case when @TrackNum = 0 then @TrackNum else UD04.Num\_c)
> 
> This way if its a zero then it will always be true, it will only look to do a comparison if a value is entered.

Not sure what you are getting at with this one. If I put that in the expression on the criteria, it will replace the criteria with the value of the field if I put something besides 0 in the parameter. If someone puts a number there, they want to filter it, and I don’t want to replace the parameter value.

> [@ckrusen](#):
>
> And did you take a screen shot of the screenshot?

yes… yes I did. 🤦‍♂️

---

<div class="post-metadata">

**Author:** ![ckrusen](https://www.epiusers.help/user_avatar/www.epiusers.help/ckrusen/32/50584_2.png) [@ckrusen](https://www.epiusers.help/u/ckrusen)\
**Post date:** [September 19, 2018, 2:29pm UTC](https://www.epiusers.help/t/parameter-skip-if-empty/47938/9 "2018-09-19T14:29:42Z")

</div>

> [@Banderson](#):
>
> Seems like a lot of messing around to get epicor to do what it looks like it should do out of the box…

Are you new to Epicor? 😉

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [September 19, 2018, 2:31pm UTC](https://www.epiusers.help/t/parameter-skip-if-empty/47938/10 "2018-09-19T14:31:10Z")

</div>

@aidacra do you think if I made a ticket on this one, someone would review the functionality of the parameters box on a BAQ?

---

<div class="post-metadata">

**Author:** ![ckrusen](https://www.epiusers.help/user_avatar/www.epiusers.help/ckrusen/32/50584_2.png) [@ckrusen](https://www.epiusers.help/u/ckrusen)\
**Post date:** [September 19, 2018, 2:34pm UTC](https://www.epiusers.help/t/parameter-skip-if-empty/47938/11 "2018-09-19T14:34:43Z")

</div>

One last thing to try. Change the format from `->>,>>>,>>9` to `>>>>`

I assume your Truck numbers aren’t negative, or have commas in them.

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [September 19, 2018, 2:35pm UTC](https://www.epiusers.help/t/parameter-skip-if-empty/47938/12 "2018-09-19T14:35:55Z")

</div>

So much hope!!

but no. ☹

It still puts the 0 in there.

---

<div class="post-metadata">

**Author:** ![ckrusen](https://www.epiusers.help/user_avatar/www.epiusers.help/ckrusen/32/50584_2.png) [@ckrusen](https://www.epiusers.help/u/ckrusen)\
**Post date:** [September 19, 2018, 2:53pm UTC](https://www.epiusers.help/t/parameter-skip-if-empty/47938/13 "2018-09-19T14:53:58Z")

</div>

I think I got it! (not pretty but works)

Make param an item list

![image](https://epiusers.help/uploads/default/original/2X/9/9aa2f741ebb637afa21a72a6aa52fe8917100545.png)

And make criteria use `IN`

![image](https://epiusers.help/uploads/default/original/2X/d/d2ac9960a4adb294d0cc6d297e3a5c754559a281.png)

---

<div class="post-metadata">

**Author:** ![jkane](https://www.epiusers.help/user_avatar/www.epiusers.help/jkane/32/57624_2.png) [@jkane](https://www.epiusers.help/u/jkane)\
**Post date:** [September 19, 2018, 2:54pm UTC](https://www.epiusers.help/t/parameter-skip-if-empty/47938/14 "2018-09-19T14:54:19Z")

</div>

> [@Banderson](#):
>
> It still puts the 0 in there.

I’m sure it is because the field is not a nullable type. Not that it really helps, but at least provides an explanation.

---

<div class="post-metadata">

**Author:** ![ckrusen](https://www.epiusers.help/user_avatar/www.epiusers.help/ckrusen/32/50584_2.png) [@ckrusen](https://www.epiusers.help/u/ckrusen)\
**Post date:** [September 19, 2018, 2:57pm UTC](https://www.epiusers.help/t/parameter-skip-if-empty/47938/15 "2018-09-19T14:57:20Z")

</div>

By “not pretty” I mean the input param looks like:

![image](https://epiusers.help/uploads/default/original/2X/4/4b8168ebc2d70c20bc93dd817df8cbf96ff8f53f.png)

But does return all records when TestParam is left blank.

And gives you the added feature\* of allowing multiple TruckNum’s to be entered.

`\* Feature - unexpected functionality that isn’t entirely bad.

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [September 19, 2018, 2:59pm UTC](https://www.epiusers.help/t/parameter-skip-if-empty/47938/16 "2018-09-19T14:59:46Z")

</div>

Yeah, it “works” if I just use a NVarChar as well, it just gives me a warning on the BAQ and lets someone put in a letter when there shouldn’t be.

The list thing is an interesting workaround too. I’ll keep that in my back pocket.

---

<div class="post-metadata">

**Author:** ![jkane](https://www.epiusers.help/user_avatar/www.epiusers.help/jkane/32/57624_2.png) [@jkane](https://www.epiusers.help/u/jkane)\
**Post date:** [September 19, 2018, 2:59pm UTC](https://www.epiusers.help/t/parameter-skip-if-empty/47938/17 "2018-09-19T14:59:57Z")

</div>

Why not convert the field to a string in a calculated field and then create the parameter against that. Then you will be able to put the parameter as a string and that allows nulls.

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [September 19, 2018, 3:01pm UTC](https://www.epiusers.help/t/parameter-skip-if-empty/47938/18 "2018-09-19T15:01:50Z")

</div>

> [@jkane](#):
>
> Why not convert the field to a string in a calculated field and then create the parameter against that. Then you will be able to put the parameter as a string and that allows nulls.

Because then someone can put in “A” for a number.

You can use a parameter of a different type. It barks at you, but it lets you do it. So that’s basically the same thing without the extra calculated field.

---

<div class="post-metadata">

**Author:** ![jkane](https://www.epiusers.help/user_avatar/www.epiusers.help/jkane/32/57624_2.png) [@jkane](https://www.epiusers.help/u/jkane)\
**Post date:** [September 19, 2018, 3:02pm UTC](https://www.epiusers.help/t/parameter-skip-if-empty/47938/19 "2018-09-19T15:02:51Z")

</div>

> [@Banderson](#):
>
> Because then someone can put in “A” for a number.

I’ve never tried this, but could you mask a string as #(8) instead of x(8)

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [September 19, 2018, 3:04pm UTC](https://www.epiusers.help/t/parameter-skip-if-empty/47938/20 "2018-09-19T15:04:52Z")

</div>

It lets you put it in, but it doesn’t seem to change any functionality. (I can still type in letters)

[Next page](https://www.epiusers.help/t/parameter-skip-if-empty/47938.md?page=2)
