
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you mean simple concat(distinct fieldname,',') not working for your purpose?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Something Like
Concat(Distinct Event,', ')

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
why not use concat function?
something like
concat(if(len(eventField)>0,eventField), ', ')


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you mean something like this
Try

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just selected them for emphasis
use
CONCAT(DISTINCT Field,',')

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
