Problem when using an input Mask.

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Ewanm
Posts: 111
Joined: Mon Jun 04, 2007 11:09 am
Location: Scotland

Problem when using an input Mask.

Post by Ewanm »

I am using the latest build of AIM and am trying to use an input mask for a mobile (Cell) phone number , the mask simply is made up of '00000000000' and should be displayed as '___________'. When displayed in the form, the mask displayed '___________' but will not allow any numbers to be entered.

As far as I can see, using '0' should allow me to enter numbers only.

I this a fault or am I doing something wrong.?
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Problem when using an input Mask.

Post by aware_support »

This should work in theory. Have you tried this in a desktop version?
Aware IM Support Team
Jaymer
Posts: 2450
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Problem when using an input Mask.

Post by Jaymer »

i use this on desktop version.
works find on LATEST build.
I use 000-000-0000
and SAVE the dashes in the field
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Ewanm
Posts: 111
Joined: Mon Jun 04, 2007 11:09 am
Location: Scotland

Re: Problem when using an input Mask.

Post by Ewanm »

Hi there,

Thanks for the advice. I am using the Desktop version but have an attribute that represents a mobile phone number. I have tries creating another attribute and setting the mask immediately on creation and it works OK. If I go to my existing attribute and set the mask, it will not allow any entry.

I will re-create the attribute and set the mask immediately on creation.

Thanks
Jaymer
Posts: 2450
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Problem when using an input Mask.

Post by Jaymer »

Aware 8.2 Bld 2571

I'm finding this now - very weird - I wonder if something got broke. Am not able to check this on 8.3

I cannot get any input mask to work.
As in the original post, I see the mask character(s), but the field will not allow ANY input.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
customaware
Posts: 2399
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Problem when using an input Mask.

Post by customaware »

Increase the length of the Attribute. The MASK will not work if it is too short
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
Jaymer
Posts: 2450
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Problem when using an input Mask.

Post by Jaymer »

Nope

thought maybe Aware was confused since the fields were not initially made with Input Mask, and were diff lengths.
so deleted phone # fields, saved, test mode, then re-added fields and onto the form.
this time, no input mask in the field def, only on the form.

no friggin' joy - PITA

PhoneNum - Plain Text - length 12, display 12 symbols
input mask 000-000-0000 set to SAVE mask in the field

all the mask chars show in the field - but you can't enter ANY data of any data type
I've had this working plenty of times - but its odd that @Ewanm found the EXACT same thing thats happening now.
In this pic, I made the form field 14 sym wide - data field still 12
doesn't matter if i'm editing or creating new rec
Attachments
Screen Shot 2019-08-06 at 1.05.49 AM.png
Screen Shot 2019-08-06 at 1.05.49 AM.png (7.33 KiB) Viewed 8906 times
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
customaware
Posts: 2399
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Problem when using an input Mask.

Post by customaware »

Make the PhoneNum attribute 20 characters long and try again.

It definately works. Have encountered a couple fo times and increasing the underlying length of the attribute fixes it
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
Jaymer
Posts: 2450
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Problem when using an input Mask.

Post by Jaymer »

yes, thats VERY weird. No reason for that behavior.

Basically, if you have a 12-char field to hold the Phone # in this format: 813-555-1212, then
you cannot leave the underlying database field as 12 characters -AND- hope to use the input mask.
Making it 20 works (and you can set the display "sym" chars to 12 so the box isn't too wide).
If its a VarChar field, and you're never going to have more than 12 in it anyways, then you've already paid the 2-byte penalty for making it variable length, so its really not hurting anything to leave it as 20... except future external programs reporting/displaying the data will want to leave room for 20.
Its not a big deal on the one hand, but it should work correctly if your field is length 12 - what happens if you can't change the underlying data structure for compat. reasons? Then its a BUG In aware that should be fixed.

PS _ Spent an hour on this already - there may be a sweet spot where 12 doesn't work, and 13 does, or 15 does. But 20 does so I moved on.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Posts: 2450
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Problem when using an input Mask.

Post by Jaymer »

I actually exported to look at the XML, which showed no diff. in the 3 phone # fields I was using to explain the diff. in behavior.
The 20-char field worked, the 12-char did not.
Then reimported thinking Aware had some internal issue - but same result.

Since it passes data off to Kendo, then it could be a Kendo bug.
Would be interesting to know if in v8.3 a 12-char field worked correctly with input mask "000-000-0000"

jaymer - done
Attachments
Screen Shot 2019-08-08 at 3.33.58 PM.png
Screen Shot 2019-08-08 at 3.33.58 PM.png (66.08 KiB) Viewed 8874 times
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Post Reply