Join multiple answers in one line

(imported topic written by sinucus)

My Google-fu has failed me so far on this quest. I’m using the QnA to do some debugging and I’m needing to join the answers into 1.

Example would be

q: names of files of folder “c:”

A: file1.txt

A: file2.txt

A: file3.txt

and I would like it look like

q: names of files of folder “c:”

A: file1.txt file2.txt file3.txt

Thanks

(imported comment written by Lee Wei)

This should work for you:

concatenations " " of names of files of folder "c:"

Lee Wei

(imported comment written by sinucus)

Well, that did work for the query that I posted but it did not work for my other query, so let me post my full example.

q: ids of relevant fixlets whose (not exists values of headers “X-Fixlet-Type” of it or (value of headers “X-Fixlet-Type” of it as lowercase != “task” and value of headers “X-Fixlet-Type” of it as lowercase != “analysis” and value of headers “X-Fixlet-Source” of it != “Internal”)) of sites whose (name of it = “custom”)

A: 3474

A: 3466

q: concatenations " " of ids of relevant fixlets whose (not exists values of headers “X-Fixlet-Type” of it or (value of headers “X-Fixlet-Type” of it as lowercase != “task” and value of headers “X-Fixlet-Type” of it as lowercase != “analysis” and value of headers “X-Fixlet-Source” of it != “Internal”)) of sites whose (name of it = “custom”)

E: The operator “concatenations” is not defined.

So far, no matter how I wrap in parenthesis or not, I always get the same error. Any ideas on why it didn’t work?

(imported comment written by Lee Wei)

Concatenations work on the String data type, so we merely have to convert the integer IDs to String.

You can add the following to the front of your first statement:

concatenations " " of (it as string) of ids of relevant fixlets...

(imported comment written by sinucus)

I fixed it, it was a “type” problem. Added the as string and everything was fine.

q: concatenation " " of (ids of relevant fixlets whose (not exists values of headers “X-Fixlet-Type” of it or (value of headers “X-Fixlet-Type” of it as lowercase != “task” and value of headers “X-Fixlet-Type” of it as lowercase != “analysis” and value of headers “X-Fixlet-Source” of it != “Internal”)) of sites whose (name of it = “custom”) as string)

A: 3474 3466

(imported comment written by Tim.Rice)

I think the reason you are getting the “not defined” error is because what you are trying to Concatenate is not a string. Try casting “as string”.

Q: concatenations " " of ((ids of relevant fixlets whose (not exists values of headers “X-Fixlet-Type” of it or (value of headers “X-Fixlet-Type” of it as lowercase != “task” and value of headers “X-Fixlet-Type” of it as lowercase != “analysis” and value of headers “X-Fixlet-Source” of it != “Internal”)) of sites whose (name of it = “custom”)) as string)