Alpha Video Training
Results 1 to 2 of 2

Thread: Xdialog variable results question

  1. #1
    Member grayfox5's Avatar
    Real Name
    Jack Ross
    Join Date
    Sep 2009
    Location
    Cleveland
    Posts
    47

    Default Xdialog variable results question

    I have an Xdialog box that prompts for several variables, including one that looks up values from another table. I'm using the pipe character (|) and advanced formatting to create two columns in the combo box for for the dialog (e.g. Salesperson + "|" + SalespersonID). The combo box looks good, with a name in the first column, ID in the second.

    What I'm trying to do is extract the ID from the second column and add it to a variable on the form. When I look at the resulting variable from the Xdialog, I see the name at the beginning of the string, and the ID at the far right of the string. But when I use alltrim(left) and alltrim(right) to extract the contents, the alltrim(right) returns, not the ID, but the right 5 characters of the first column (name). When you define multiple columns in a combo box, is only the first column the "real" one, or are any additional columns also captured?

    Jack

  2. #2
    Member grayfox5's Avatar
    Real Name
    Jack Ross
    Join Date
    Sep 2009
    Location
    Cleveland
    Posts
    47

    Default Re: Xdialog variable results question

    Sorry, found the answer. The entire string including first and subsequent columns are indeed captured (just for information's sake). I was reassigning the same variable name to the alltrim(left) before I tried to capture the right portion of the variable to a different name. The result was that I was trying to extract the name only instead of the original full variable. Once I swapped the alltrim functions, everything is captured as it should be.

    Jack

Similar Threads

  1. Use variable in Xdialog?
    By Bill Warner in forum Alpha Five Version 5
    Replies: 3
    Last Post: 11-04-2014, 07:17 PM
  2. Using variable in Xdialog %dlg%
    By Tony Saladino in forum Alpha Five Version 7
    Replies: 4
    Last Post: 02-11-2006, 08:46 PM
  3. Query Results Question
    By davej in forum Alpha Five Version 6
    Replies: 4
    Last Post: 02-22-2005, 06:32 PM
  4. Use variable in Xdialog?
    By Bill Warner in forum Alpha Five Version 6
    Replies: 6
    Last Post: 12-04-2004, 02:08 PM
  5. Xdialog results to a variable
    By crimmelcp in forum Alpha Five Version 5
    Replies: 1
    Last Post: 05-22-2004, 08:24 PM

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
  •