1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Stackoverflow]

Discussão em 'StackOverflow' iniciado por fdantas, Setembro 24, 2021.

  1. fdantas

    fdantas Administrator Moderador

    I am creating a selection-list, which needs to contain a list of names of persons. Currently, it looks as follows:

    DEFINE VARIABLE sl-competitors AS CHARACTER FORMAT "X(60)":U
    LABEL "Competitors"
    VIEW-AS SELECTION-LIST MULTIPLE SCROLLBAR-VERTICAL
    LIST-ITEM-PAIRS "Alley Anna", "1", "Bower Bob", "2", "Chaplin Charlie", "3", "Drew Derek", "4", "Evon Eve", "5"


    This is not what I want: I want the surname and the first name to be separated by a comma. Obviously this means that the delimiter, to be used in the selection-list, should be something else, and I agree with using a pipe character ("|", ASCII code 124).

    However, it seems not to be possible to add a DELIMITER attribute at design time:

    DEFINE VARIABLE sl-competitors AS CHARACTER FORMAT "X(60)":U
    LABEL "Competitors"
    DELIMITER "|" or DELIMITER 124 <== this is not accepted.
    VIEW-AS SELECTION-LIST MULTIPLE SCROLLBAR-VERTICAL
    LIST-ITEM-PAIRS "Alley Anna", "1", "Bower Bob", "2", "Chaplin Charlie", "3", "Drew Derek", "4", "Evon Eve", "5"


    Also, adding commas in the names seems to give problems:

    DEFINE VARIABLE sl-competitors AS CHARACTER FORMAT "X(60)":U
    LABEL "Competitors"
    VIEW-AS SELECTION-LIST MULTIPLE SCROLLBAR-VERTICAL
    LIST-ITEM-PAIRS "Alley, Anna", "1", "Bower, Bob", "2", "Chaplin, Charlie", "3", "Drew, Derek", "4", "Evon, Eve", "5"


    This is most probably caused by the fact that by default a comma is used.

    How can I define the delimiter and the list of names, containing commas, at design time?

    The usage of tools (appBuilder, PDSOE) is not helpful, as they don't allow to modify the delimiter.

    Continue reading...

Compartilhe esta Página