PacificStar Posted March 24, 2009 Posted March 24, 2009 I would like to use a calculation to combine the contents of one field from every record. If the field the values are: Record 1: apple Record 2: pear Record 3: orange I want the calculated result to be "applepearorange" I can do this is a script that loops through every record, but would like to do it as a calculation if possible. I've been hunting around without success for a way of doing this.
Søren Dyhr Posted March 24, 2009 Posted March 24, 2009 Since you not seems to be on an Adv. version, are custom functions out of reach: http://www.databasepros.com/FMPro?-DB=resources.fp5&-lay=cgi&-format=list.html&-FIND=+&resource_id=DBPros000663 You are a bit too thrifty with the details unfortunately, should this solely respect the found set? What is the purpose and context it's needed for? --sd
PacificStar Posted March 24, 2009 Author Posted March 24, 2009 I'm using just regular FM9. I do not have any experience with custom functions. The result should only be based on the found set. I'm currently looping through the records to achieve the result I want, but it delays the process. I have two uses for it. For business, I use it to generate a key that indicates what item numbers are currently on a web page. If an item sells out, its item number is removed from the key. Since the key is different than the last uploaded key, the web page is regenerated and loaded again with the updated key. For entertainment, I'm also trying to use the process to break a book cipher. The result of the loop is the (possible) message. FM then looks for words in the message, and if not finding them, moves on to the next one.
comment Posted March 24, 2009 Posted March 24, 2009 It's not quite clear, but I think you could achieve the first goal by using the ValueListItems() function (after defining a suitable calculation field, and a value list based on it). It won't be limited to the found set, though. There is no function to summarize text values of the found set. Even a custom function would be limited to a maximum of 50,000 records - and it wouldn't be much faster, since it too would essentially loop across the entire found set. A similar result could be achieved without the Advanced version by using a repeating calculation field (with a limit of up to 32,767 records). I'm afraid I wasn't able to understand the second task.
Recommended Posts
This topic is 5782 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 accountSign in
Already have an account? Sign in here.
Sign In Now