Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

expression : concatenate all possible values into a single row ?

Hello,

I am doing some reporting based on some events. There is a date filter and on selecting different dates, I can get 1-15 records. For one specific field, I need to concatenate all those values into a single one, separate by comma.

So my question is that if I get many records for a certain field (Under certain filters/criteria), how can I concatenate them all into a single one.

I need to do this because I am plotting those events on google and sometimes I get more than one event on a single point. I need to show the names of all those events in the popup, and to do this, I need to concatenate them

so for example, I select a date, and I get the following

event1

event2

event3

.

.

.

.

event10

How can I dynamically concatenate these all into a single expression

Syed

1 Solution

Accepted Solutions
rustyfishbones
Master II
Master II

Do you mean something like this

2014-03-04_2016.png

Try

2014-03-04_2019.png

View solution in original post

8 Replies
Not applicable
Author

you mean simple concat(distinct fieldname,',') not working for your purpose?

MK_QSL
MVP
MVP

Something Like

Concat(Distinct Event,', ')

Anonymous
Not applicable
Author

why not use concat function?

something like

concat(if(len(eventField)>0,eventField), ', ')

rustyfishbones
Master II
Master II

Do you mean something like this

2014-03-04_2016.png

Try

2014-03-04_2019.png

Not applicable
Author

different values are different records..suppose I have 10 unique records ...each row containing a differnt unique event...how do I make the below string from those 10 records

Event1, Event2, Event3,.......Event10

So here I am not concatenating different fields..but I am concatenating all the records of the same column (Events)

Not applicable
Author

Yes, I mean this exactly like this. getfieldselections(Event) would give me this If it was a listbox and I selected those events

However, this is not a listbox and I want to achieve the same without using getfieldselections as I want to get those dynamically without selecting them in the listbox

Syed

rustyfishbones
Master II
Master II

I just selected them for emphasis

use

CONCAT(DISTINCT Field,',')

Not applicable
Author

Thank You All. You were all correct. I had not used this function before and I did not know that this function concatenates all the values of a column. This worked exactly the way I needed it to do

Arif