Alpha DevCon 2018
Results 1 to 4 of 4

Thread: sql_get_value --> split results into Display / Value array

  1. #1
    Member pettechservices's Avatar
    Real Name
    Chris Sutton
    Join Date
    Apr 2012
    Location
    Southern New Jersey
    Posts
    388

    Default sql_get_value --> split results into Display / Value array

    I'm doing the following (thanks to DavidK for help so far!)

    vList = sql_get_values(cn, table, filter, results,.f.,1000 ,.f., args)
    vList = sortsubstr(vList, crlf())
    vList = js_list_to_array(vList)

    js = "A5.form.populateSelect('" + eleId + "',''," + vList + ",true);"
    popDropdown = js



    The issue I'm having is this will only show display items, not values.

    If I set results to "displaycolumn,valuecolumn", in the dropdown I get "DisplayText|Value".

    My question is, how can I split vList into an array? so that I can pass that along to the populateSelect function?

    Thanks,
    Chris

  2. #2
    Member pettechservices's Avatar
    Real Name
    Chris Sutton
    Join Date
    Apr 2012
    Location
    Southern New Jersey
    Posts
    388

    Default Re: sql_get_value --> split results into Display / Value array

    *bump*

  3. #3
    Member pettechservices's Avatar
    Real Name
    Chris Sutton
    Join Date
    Apr 2012
    Location
    Southern New Jersey
    Posts
    388

    Default Re: sql_get_value --> split results into Display / Value array

    Please, anyone??? I'm really stuck how to get values added into there....

  4. #4
    Member pettechservices's Avatar
    Real Name
    Chris Sutton
    Join Date
    Apr 2012
    Location
    Southern New Jersey
    Posts
    388

    Default Re: sql_get_value --> split results into Display / Value array

    Ironically, Richard Rabins actually posted how to do this today in the announcements forum. So I finally have this working!

Similar Threads

  1. Execute Crosstab Query in Xbasic - How Do I Display Results?
    By kingcarol in forum Application Server Version 11 - Web/Browser Applications
    Replies: 14
    Last Post: 03-02-2012, 08:25 AM
  2. Display the Search Date results on a report?
    By Rich Hartnett in forum Web Application Server v7
    Replies: 1
    Last Post: 11-06-2010, 08:14 AM
  3. Display List Box Results
    By kyosadls in forum Alpha Five Version 9 - Desktop Applications
    Replies: 20
    Last Post: 05-13-2009, 07:55 AM
  4. How to display query results in a browse on form?
    By brett s in forum Alpha Five Version 7
    Replies: 0
    Last Post: 11-24-2006, 09:15 PM
  5. Line item data with "split display"
    By Mike Lange in forum Alpha Five Version 4
    Replies: 1
    Last Post: 05-13-2002, 06:38 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
  •