Jump to content
Server Maintenance This Week. ×

Summarize data by concatenating value of specified field across all records?


This topic is 6056 days old. Please don't post here. Open a new topic instead.

Recommended Posts

The subject heading may be obscure... I have a table with a text field -- let's call it Table::t_Words. I want to define a field that will take all values of Table::t_Words for the current found set and concatenate them (in their current sort order). Sort of a summary field, but instead of adding or averaging numbers, it concatenates text. Can such a thing be defined? Some clever calculation, perhaps, involving value lists? Does anybody have any ideas?

Link to comment
Share on other sites

Currently I use a looping script, but I'd like something that updates automatically, without having to be executed by the user.

I thought of the self-join --> value list --> replace line-breaks with spaces calculation, and it worked, sort of, but it automatically sorts the words in alphabetical order, rather than preserving the current sort order.

I guess I'll stick with my script for now. ???

Link to comment
Share on other sites

Not if you want to get the found set (and not in version 8). You need a custom function for this, something like:

ListFoundSet ( fieldName ; startRecord ; endRecord )

Let ( [

item = GetNthRecord ( fieldName ; startRecord )

] ;

Case ( not IsEmpty ( item ) ; item & ¶ )

&

Case ( endRecord > startRecord ; ListFoundSet ( fieldName ; startRecord + 1 ; endRecord ) )

)

Link to comment
Share on other sites

This topic is 6056 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.