Who knows how to get rid of this auto generated symbol inside barcodeField? It creates false sense of available data thereby affecting my coding logics. The screenshots of both the Interface and expression are attached.
Discussion posts and replies are publicly visible
Thanks to all. I have figured out what the bug is. The value is set to a local variable and this is automatically loaded with the application. The screenshot is attached in case someone runs into the same issue in the future.
So out of curiosity, what was the auto-loaded value of the local variable? I was able to reproduce approximately the same effect last night when I tried, by setting the value to a typecast integer and entering too long of a number; though by default it wanted to save the entered value as text, which did not produce that error.
The auto-loaded value is 12-digit numbers, just something to represent a barcode. "Though by default it wanted to save the entered value as text, which did not produce that error". I need clarification here because I will still like to save the value. Or can I just save it into a Rule Input and not in the local variable ?
I guess it depends on what your initial value declaration for "local!barcode" was. If it was based on an integer-type Rule Input, then perhaps it would behave in the way you pictured. When I first tried a bare form with a local variable "local!value" with no default value set, and set it to the value and saveInto of an a!barcodeField, and entered a long string of numbers, I noticed that it saved into the local variable as Text type. I had to alter the saveInto to cast the save!value to integer, then i got the "infinity symbol" when entering the same long string of numbers (i.e. 15 "1"s).
Hi Mike, the auto value has nothing to do with my initial value. It's a behavior of the barcode component itself. I would like to get rid of this default value as it's affecting my logic. There is a button I don't want to show until a value is entered into the barcode. The behavior is not consistent with the default barcode value. The screenshots are attached. Any help will be appreciated.
Hi
I tried the same thing that you did and the barcode component seems to be working fine without any infinity error through the local variables. But yes it is not working correctly if you are using rule input of type integer. Adding screenshots. So your solution here would be to use local variables it will not cause any issue unless you are casting it to an integer or you can also use rule input of type text which should also work absolutely fine.
Using Local variables:
Using Rule input of type integer:
Similarly, I was able to reproduce the issue if and only if I manually typecast the value to integer upon save (which has approximately the same net effect as saving it into an integer RI).
a!localVariables( local!barVal: null(), a!barcodeField( label: "My Barcode", value: local!barVal, saveInto: a!save( local!barVal, tointeger(save!value) ) ) )
Hi Vinita,
I am always appreciative of your contribution. The barcode works. The issue is about a default "infinity" value in the component which I do not want. I want the barcode to be empty with no default value until the user inputs a value.
Thanks, Mike. Vinita has provided the solution.