Constructlistmatrix examples do not compile

I’m trying to construct a Text List Object in a form. I’ve been able to do it in two or three different ways but I can’t work out how to have the list display only the records which have been selected in the database (I want to use it to produce an invoice).

I thought of trying the constructlistmatrix statement because it appeared to offer more options but I can’t get it to work. The Help wizard entry has two examples:

constructlistmatrix initializedictionary(
    <rows:20>
    Quantity<width:7c><align:center>
    Item<width:25c><search>
    Price<width:10c><align:right>
    )

which gives a compile error message, “Expression contains an operator when an operand was expected” and

constructlistmatrix initializedictionary(
    Quantity<width:7c><align:center>
    Item<width:25c><search>
    Price<width:10c><align:right>
    )

which gives a compile error message, “Missing Right Parenthesis”.

Firstly, can anybody replicate these compile errors and secondly, how do I get a Text List Object to display only the selected records?

Regarding the second question, one way to restrict records in a TextList to those that are selected is to insert info(“visible”) into the query box of the TextList options. I just discovered this in thinking about your question, so good question.

That’s brilliant Tom! How on earth did you trip over that little gem?

The examples on this page are just plain wrong, even the terminology is wrong, it should have said “template”, not “dictionary”. Here are the correct examples, basically just remove initializedictionary( and add quotes.

constructlistmatrix |||<rows:20>
    Quantity<width:7c><align:center>
    Item<width:25c><search>
    Price<width:10c><align:right>
    |||

and

constructlistmatrix |||
    <matrix><rows:6><rowheight:48>
    Quantity<width:7c><align:center>
    Item<width:25c><search>
    Price<width:10c><align:right>
    |||

I have corrected this page, the correction is on the web version (use link below) but won’t be corrected in the in-app help until the next release.

By the way, this statement is used by the List/Matrix constructor dialog, so the documentation for that dialog also applies, and has more/better examples.

These new ones still produce errors (and, yes I did change the field names to match those of my database) but maybe that’s something to look into later.

The new examples don’t produce a compile error, but they do produce an error in the generated list object. There is a bug in the constructlistmatrix statement that causes this error in the generated formula if the template contains a non-blank line that just has spaces in it. I have fixed this bug for the next release, in the meantime, just make sure that there are no lines in the template with just spaces in them. So for now, this will work:

constructlistmatrix |||<rows:20>
    Quantity<width:7c><align:center>
    Item<width:25c><search>
    Price<width:10c><align:right>|||

Or this (it is ok because the last line is completely empty, no spaces)

constructlistmatrix |||<rows:20>
    Quantity<width:7c><align:center>
    Item<width:25c><search>
    Price<width:10c><align:right>
|||

Once the next release comes out then the examples I posted earlier will work correctly.

Thanks Jim.