Concatenate with and padding for constant width columns
Last Post 04-21-2011 05:42 AM by Ryan Bakerink. 3 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages Not Resolved
Mark BuelsingUser is Offline
river guide
river guide
Posts:241
Avatar

--
04-20-2011 12:21 PM

    Hi, I have a list box on a form that is getting its QuestionOption from a stored procedure. The SP is concatenating 3 colunns of data together to fill the QuestionOption. This works, but I'm working on the presenation. The data wanders vertically, like the following:

    Houses, red brick, 56.00
    Vacation Homes for sale, various construction, 56.00

    Ideally, I'd like to line each piece of data up vertically with the corresponding piece of data in the row above and or below it, similar to (but better than)

    Houses,                                 Red Brick,                      65.00
    Vacation Homes for sale,       various construction,      56.00

    The padding that I have inserted using SQL is stripped out when the data makes it into the Dynamic Forms list box. So I'm at a loss as how to achieve vertically lining up the pieces of data as I show above.

    Do you have a suggestion?  Thanks in advance.

    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    04-20-2011 01:03 PM
    Hello,

    This can be hard to do, as you have separate values in one. I don't think this can be accomplished with a listbox and our module.

    With what you're describing this is the functionality of an HTML table, and you can't have that inside of a listbox.

    If you have any questions please let us know.

    Thanks,

    Ryan
    Mark BuelsingUser is Offline
    river guide
    river guide
    Posts:241
    Avatar

    --
    04-20-2011 04:55 PM
    Is there a field type that will display three columns of data from a select statement or stored procedure?
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    04-21-2011 05:42 AM
    Hello Whetstone,

    Basically how I would approach this is by using a stored procedure with a split function that will split based on commas. Then you can build an HTML string that will include a HTML table incorporated with the SQL.

    So say after you split your values, lets say our 3 values are: Text, Value, Description.

    Your string may look like this:

    htmlstring = '[table]'
    Start a Cursor -- start loop

    htmlstring += '[tr][td]' + Text + '[/td][td]' + Value + '[/td][td]' + Description +'[/td][/tr]'

    End Cursor -- end loop

    htmlstring += '[/table]'


    So this is how you can get a table format. Just be sure to replace all of the HTML tags placed inside of '[]' change that to angle brackets '<>'.

    If you have any questions please let me know.

    Thanks,

    Ryan


    ---
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi