Alpha DevCon 2018
Results 1 to 3 of 3

Thread: Null appearing in Number pad editor when bound

  1. #1
    Member
    Real Name
    Peter Caspari
    Join Date
    Feb 2012
    Posts
    193

    Default Null appearing in Number pad editor when bound

    Hi,

    I've been experimenting with binding the sample app to an SQL table and when I click on a Number pad field it comes up with "null". When I then click on the numbers the append to the null eg "null123".

    Am I doing something wrong?

    Thanks

  2. #2
    Member
    Real Name
    Peter Caspari
    Join Date
    Feb 2012
    Posts
    193

    Default Re: Null appearing in Number pad editor when bound

    Easy fix actually

    In EDITORNUMBERPAD, "set value in editor" include

    if(value==null){
    value='';
    }

  3. #3
    Alpha Software Employee Beta Spark's Avatar
    Real Name
    Sarah Mitchell
    Join Date
    Jul 2015
    Posts
    399

    Default Re: Null appearing in Number pad editor when bound

    Hi Peter,

    Sorry for the delayed reply.

    It looks like you figured it out, but for clarity. If the value is null, value+"" converts the null value into the text "null". In The Number Pad and Big Keypad, instances of value needs to be set to an empty string if it's null:

    Code:
    if (value==null) { value = ""; }
    This change needs to be added to the Set Value in Editor for both EDITORNUMBERPAD and EDITORBIGKEYPAD.

    Additionally, to correct some display issues in the Form View itself, the function "specialValueFormat" also needs to be updated. It can be found in the Javascript functions Code section for the UX component. Here, you'll find that value+"" is also being used and needs to be updated to handle the null case.

    Code:
    	str = (value==null?"":value+"");
    Good luck!
    Sarah Mitchell

    Looking for answers? Try our documentation.
    If you can't find something, let us know!

Similar Threads

  1. Edit Users and security with ux list bound component (not table bound)
    By Jane1234 in forum Mobile & Browser Applications
    Replies: 0
    Last Post: 05-13-2015, 12:23 AM
  2. Code Editor Number of Lines Limit Hit
    By swksys in forum Application Server Version 11 - Web/Browser Applications
    Replies: 0
    Last Post: 02-20-2012, 10:48 AM
  3. Pad syntax
    By John Cunradi in forum Alpha Five Version 8
    Replies: 5
    Last Post: 07-27-2010, 11:21 AM
  4. How do I format a number with a Zero pad in front of the number?
    By Julie in forum Application Server Version 9 - Web/Browser Applications
    Replies: 6
    Last Post: 11-19-2008, 05:18 PM
  5. text pad/editor has ceased to work
    By IAN franklin in forum Alpha Five Version 4
    Replies: 4
    Last Post: 01-16-2003, 08:53 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •