AnsweredAssumed Answered

Concatenating unique values

Question asked by AlastairMcInnes on Aug 6, 2012
Latest reply on Aug 7, 2012 by philmodjunk

Title

Concatenating unique values

Post

Hello,

I have a table with lists of categories in it, stored along with the ID of a book title that they belong to. If I do a search for a book ID, I might get, say, three records with the category list from each being:

172,173,176
172,173,177
172,178,179

What I would like to do is take those three values and create a single string with 172,173,176,177,178,179 in it.

It's not super critical that the values be in numerical order but it is important that there be no repeats. So I need to be able to ignore the 172,173 from the second record and the 172 from the third record.

I have no idea how to do this and would appreciate any help that could be offered.

I wondered about creating a custom function but, to be honest, I don't know how to do that either so maybe I can just do it in a script.

So far, this section of script is:

Go to Layout [ “CategoryTitleLink” (CategoryTitleLink) ]
Enter Find Mode [ ]
Set Field [ CategoryTitleLink::_fkTitle; $TitleID ]
Perform Find [ ]
If [ Get(FoundCount) > 0 ]
Go to Record/Request/Page [ First ]
Loop
??????
Go to Record/Request/Page[ Next; Exit after last ]
End Loop
 
I need something to replace the ???s
 
Thanks in advance,
Alastair 

 

Outcomes