如何在设计时为包含逗号的选择列表指定 items/item 对列表?

How to specify a list of items/item pairs for a selection list, containing commas, at design time?

我正在创建一个选择列表,其中需要包含一个人名列表。目前,它看起来如下:

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"

这不是我想要的:我想要用逗号分隔姓氏和名字。显然,这意味着要在选择列表中使用的定界符应该是其他东西,我同意使用竖线字符("|",ASCII 代码 124)。

但是,似乎无法在设计时添加 DELIMITER 属性:

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"

此外,在名称中添加逗号似乎会带来问题:

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"

这很可能是由于默认使用逗号造成的。

如何在设计时定义包含逗号的分隔符和名称列表?

使用工具(appBuilder、PDSOE)没有帮助,因为它们不允许修改分隔符。

您可以稍后在主区块或任何您想要的地方进行

定义变量

DEFINE VARIABLE sl-competitors AS CHARACTER 
 VIEW-AS SELECTION-LIST MULTIPLE SCROLLBAR-VERTICAL

分配列表项

sl-competitors:DELIMITER = "|".
sl-competitors:LIST-ITEM-PAIRS = "Alley, Anna|1|Bower, Bob|2|Chaplin, Charlie|3|Drew, Derek|4|Evon, Eve|5".