BAQ int parameter fails in designer but works in RDD and REST

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.

image

Question why not cast a String as Int?

I never questioned it its been like that for a long time.

I always use the string one instead and cast.

2 Likes

@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. :neutral_face: 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.

1 Like

@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.

@CSmith Definitely mixed results when I tried it as an input mask

  • x(8) = alphanumeric up to 8 characters (as expected)
  • 9(8) = alphanumeric up to 4 characters
  • 9(10) = alphanumeric up to 5 characters
  • 9(16) = alphanumeric up to 5 characters

Yeah, you thought there was going to be a pattern there, didn’t you? Nope. Utter madness. And still not numeral-only as desired.

So moral of the story is just know what you are doing and believe it will work out in the end.

That is like the worst moral of the story ever.

Submitted to development as PRB0226291.

:crossed_fingers:

1 Like

PRB0226291 is accepted for future implementation.

Fingers still crossed.

How do you use boolean which is always true/false no tri-state :slight_smile: I always have that problem in Dashboards when I include a checkbox.

I work around it by using drop-downs, but similar issue.

1 Like

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.

1 Like

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

1 Like

@ckrusen Nice one.