Alpha Video Training
Results 1 to 5 of 5

Thread: Multi select list box

  1. #1
    VAR
    Real Name
    Bill Parker
    Join Date
    Apr 2000
    Location
    Dallas, TX
    Posts
    1,699

    Default Multi select list box

    I have had a struggle with a multi select list box on a dialog component. The documentation has not been particularly helpful, but at least the msg board archive got me partial success. I am stuck on validating that a selection has been made. In the validation section I have tried
    Code:
    CurrentValue <> ""
    and
    CurrentValue.dump()<>""
    neither of those work. In the AfterValidate, the following code does save the correct value to a table.

    Code:
    list = campus.dump()
    list = crlf_to_comma(list)
    tPerson.Campus = list
    I just need to validate that a selection has been made, and no, I do not want to set an initial value.

    Bill.

  2. #2
    VAR csda1's Avatar
    Real Name
    Ira J Perlow
    Join Date
    Apr 2000
    Location
    Boston, Massachusetts, USA
    Posts
    3,530

    Default Re: Multi select list box

    Bill,

    I don't find the documentation particularly helpful either for the things I try to do. Most of the time, I find similar ones in the Learning Xdialog database, or use the genie to generate something close, then I modify it.

    Can you post some code?
    Regards,

    Ira J. Perlow
    Computer Systems Design


    CSDA A5 Products
    New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
    CSDA Barcode Functions

    CSDA Code Utility
    CSDA Screen Capture



  3. #3
    VAR
    Real Name
    Bill Parker
    Join Date
    Apr 2000
    Location
    Dallas, TX
    Posts
    1,699

    Default Re: Multi select list box

    Since this is a web component it is more difficult to post code. The original msg has the single line of code (2 different tries) that is the validation property that is not working for me.

    I have a multi-select drop down variable called Campus in the dlg component. The result of the variable is an array, although the doc I was reading for the first couple hours said it was a character. But in the validation section you supposedly use the reference "CurrentValue", which is always a character?

    Just not sure how to check it.

    Bill.

  4. #4
    VAR Pat Bremkamp's Avatar
    Real Name
    Pat Bremkamp
    Join Date
    Apr 2000
    Location
    Oregon, USA
    Posts
    2,602

    Default Re: Multi select list box

    Bill,

    Here is what I think I know about your issue.

    It seems like the multiselect creates an array (in your case campus[]) and always creates at least one element.

    So, the way I validate that something was selected is:

    if alltrim(campus[1])="" 'nothing selected

    Don't know if that's the best way, but it seems to work for me. Obviously, it will fail if a blank entry is selected, but that's another issue.

    Pat

  5. #5
    VAR
    Real Name
    Bill Parker
    Join Date
    Apr 2000
    Location
    Dallas, TX
    Posts
    1,699

    Default Re: Multi select list box

    Thanks Pat,

    I'll give that a try. You put that in the Validate event for the form? It does not work as a custom validation for the validate property of the variable.

    So if it is in the validate event, you don't use any of the CurrentForm... stuff?

    Bill.

Similar Threads

  1. multi-select list box and filter
    By Ray Farland in forum Alpha Five Version 5
    Replies: 2
    Last Post: 04-15-2005, 04:11 AM
  2. multi-select list box question
    By davidv43 in forum Alpha Five Version 5
    Replies: 2
    Last Post: 03-03-2004, 06:55 AM
  3. Multi-select List Box Problem Help Needed
    By Alan Lucas in forum Alpha Five Version 5
    Replies: 6
    Last Post: 06-18-2003, 07:01 AM
  4. Multi-Select List Box
    By Louis Nickerson in forum Alpha Five Version 5
    Replies: 10
    Last Post: 01-30-2003, 04:37 PM
  5. Improving the new Multi-Select List Box
    By Tom Mills in forum Alpha Five Version 5
    Replies: 2
    Last Post: 11-04-2002, 03:22 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
  •