Ever try to use an int as an optional parameter in a BAQ?
In the BAQ Designer, it always takes it as zero, even if it is blank when I submit - it’s the InvoiceNumber in the pic. I set the parameter to ignore if empty, but it never considers it to be empty - it always looks at it as zero (unless I were to actually type a number, of course).
This made testing this frustrating, because it turns out that this all works exactly the way I want in the RDD I am building - it’s only BAQ designer that is defeated. (REST calls also work fine, FYI.)
So unless I am missing something of how to make it actually work in Designer, this is just to say, don’t give up!
I think I’ll put in a ticket for this. I was going to make it an “idea,” but I feel this is more of a bug. Either way, I’ll post an update.
@CSmith, @hkeric.wci Well, I am stubborn and just want it to work out of the box. Also, you know, I hadn’t thought of that. I was trying to wrap my head around how to do something like that, but I was thinking in the wrong direction.
It is nice if the input box can only accept numerals - although, isn’t there a way to do that with the string format? Like 9(8) instead of x(8) ? Not sure how that translates to a report screen, for example.
@JasonMcD AFAIK the Format does not work as a ‘Input’ Masking Agent for nvarchar. Normally only sets Mask Length AFAIK on string input but does mask for Int and length on a Int field.
Horrible answer, but I just avoid them. I never have the patience to figure something out. I really do hate not having the ability for a triple-state box.
That is definitely worthy of an Idea, though. +3 on that one from me.
I make a calc field of type nvchar, whose value is “Y” when the bool field is true, and “N” otherwise. Then in the report or dashboard, use a string input tied to that calc field.
Entering a Y gives only records where that bool is true.
An N gives the records when it’s false
Leaving it blank will effectively ignore that condition
Edit
I used to make the calc result “YB” or “NB”, and make the condition MATCHES, so users would enter B for both. Then I realized that leaving it blank does the same thing. And I’d guess ignoring it is faster than doing all those matching comparisons