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.
Maybe set the default value to 0.00
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.
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.
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.
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.
It cannot be cleared.
Sometimes null.
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…
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.
yes… yes I did.
Are you new to Epicor?
@aidacra do you think if I made a ticket on this one, someone would review the functionality of the parameters box on a BAQ?
One last thing to try. Change the format from ->>,>>>,>>9
to >>>>
I assume your Truck numbers aren’t negative, or have commas in them.
So much hope!!
but no.
It still puts the 0 in there.
I think I got it! (not pretty but works)
Make param an item list
And make criteria use IN
I’m sure it is because the field is not a nullable type. Not that it really helps, but at least provides an explanation.
By “not pretty” I mean the input param looks like:
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.
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.
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.
I’ve never tried this, but could you mask a string as #(8) instead of x(8)
It lets you put it in, but it doesn’t seem to change any functionality. (I can still type in letters)