New call-to-action
Results 1 to 9 of 9

Thread: How do I use valueNotInList javascript to add new values from MultiselectTokens?

  1. #1
    "Certified" Alphaholic
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    1,127

    Default How do I use valueNotInList javascript to add new values from MultiselectTokens?

    Hi
    I love the MultiselectTokens control, i use it a lot. In 90% of the cases, i need to enter new values into my MariaDB db.
    I use a very simple table with a character field that is selected as base for my MultiSelectTokens control. The comments for valueNotInList javascript, which is triggered if the user enters a value that does not exist in the table, are not very helpful. In the documentation and Selwyn video they talk about using this javascript trigger to enter new records, but it's not shown.
    Did anyone implement this and could share the method with me?

    Thanks
    Jaime

  2. #2
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,907

    Default Re: How do i use valueNotInList javascript to add new values from MultiselectTokens?

    The valueNotInList event would be used for you to test the value entered and then, if you wanted to, call an AjaxCallback to add that value to your MariaDB table.

    Unfortunately, that event doesn't work.

    To test it with your system add a simple alert('here in valueNotInList'); statement to the event, run your UX, and then type in a value to your MultiSelectToken control. You should get an alert. What I'm seeing is no event firing and the value I typed gets cleared.

    You should report this to Alpha.

  3. #3
    "Certified" Alphaholic
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    1,127

    Default Re: How do i use valueNotInList javascript to add new values from MultiselectTokens?

    Thanks David! In Selwyn's video it seems to work, it's just that it's not clear what's the value of the token being added. Will check and report back.

  4. #4
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,907

    Default Re: How do i use valueNotInList javascript to add new values from MultiselectTokens?

    This is from the comments in the event...

    Fires if the user types in a value and then presses Enter and the value is not in the list of choices
    Your code can reference:
    val - the value the user typed in
    ci - the ViewBox control
    Just tried it in the "official" release and in the pre-release and that event is not firing. If you're using the same release as used in the video then I'm sure you'll be ok.
    Last edited by Davidk; 02-12-2020 at 01:06 AM.

  5. #5
    "Certified" Alphaholic
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    1,127

    Default Re: How do i use valueNotInList javascript to add new values from MultiselectTokens?

    Ouch...doesn't work in build 6402. Will send this to Alpha asap

  6. #6
    "Certified" Alphaholic
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    1,127

    Default Re: How do i use valueNotInList javascript to add new values from MultiselectTokens?

    Sent to Alpha, there was an issue indeed. It has been fixed and will be in tomorrow's build.
    <g> can't beat that response time, never saw this in any other development tool

  7. #7
    Alpha Software Employee Sarah Mitchell's Avatar
    Real Name
    Sarah Mitchell
    Join Date
    Jul 2015
    Posts
    462

    Default Re: How do i use valueNotInList javascript to add new values from MultiselectTokens?

    Quote Originally Posted by WindForce View Post
    Hi
    I love the MultiselectTokens control, i use it a lot. In 90% of the cases, i need to enter new values into my MariaDB db.
    I use a very simple table with a character field that is selected as base for my MultiSelectTokens control. The comments for valueNotInList javascript, which is triggered if the user enters a value that does not exist in the table, are not very helpful. In the documentation and Selwyn video they talk about using this javascript trigger to enter new records, but it's not shown.
    Did anyone implement this and could share the method with me?

    Thanks
    Jaime
    Hello Jaime,

    I already contacted you directly, but so others have this info as well, the Documentation was updated examples of using the valueNotInList and onChange events. You can find it here.
    Sarah Mitchell
    Documentation | Alpha Software Corporation
    Get in the know! Join us for our Weekly Webinars: TransForm Tuesday and Wednesday's Alpha Anywhere Demo and Q&A
    Connect with us: Instagram | Twitter | Facebook | LinkedIn | YouTube


  8. #8
    Alpha Software Employee Sarah Mitchell's Avatar
    Real Name
    Sarah Mitchell
    Join Date
    Jul 2015
    Posts
    462

    Default Re: How do i use valueNotInList javascript to add new values from MultiselectTokens?

    Also, as a reminder, if you come across something in doc that is unclear, please do not heasitate to use the "Report a problem with this page" link at the bottom of the article to let us know.

    reportit.png
    Sarah Mitchell
    Documentation | Alpha Software Corporation
    Get in the know! Join us for our Weekly Webinars: TransForm Tuesday and Wednesday's Alpha Anywhere Demo and Q&A
    Connect with us: Instagram | Twitter | Facebook | LinkedIn | YouTube


  9. #9
    "Certified" Alphaholic
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    1,127

    Default Re: How do i use valueNotInList javascript to add new values from MultiselectTokens?

    Quote Originally Posted by Sarah Mitchell View Post
    Hello Jaime,

    I already contacted you directly, but so others have this info as well, the Documentation was updated examples of using the valueNotInList and onChange events. You can find it here.
    Came here to update the post and found out you beat me to it:-) This is really really beautiful, the sample in the doc is exactly what i need in a gazillion apps :-)

Similar Threads

  1. Calling <%A5 within Javascript and gettiing the js values
    By drex_ej in forum Mobile & Browser Applications
    Replies: 5
    Last Post: 01-07-2014, 08:25 AM
  2. Getting values from a table to a javascript function
    By jcarrallo in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 12-01-2013, 03:04 PM
  3. getting Javascript values in Xbasic
    By prashantvarma in forum Application Server Version 10 - Web/Browser Applications
    Replies: 2
    Last Post: 11-30-2011, 12:22 AM
  4. Javascript NaN message - strings vs. values
    By Jay Talbott in forum Application Server Version 10 - Web/Browser Applications
    Replies: 7
    Last Post: 05-27-2010, 02:22 AM
  5. Exchange Values between Grid and Function Javascript
    By fernandopm in forum Application Server Version 9 - Web/Browser Applications
    Replies: 0
    Last Post: 11-05-2009, 01:44 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
  •