• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 242
  • Last Modified:

unother post manipulation

Some of you realy are fantastic. Im more like a userinterfaceperson. Please help me out
Recently I aske a question and got an excellent example from  lesouef. However I found that an_ is also calculated as a space. (at least in swedish character set) some emailadresses went wrong with the (usefirst 2 words as email-method)
Now the records look a little bit different. They look like this: Fieldsnames in the first raw.
Mailadress                            Group                      Country
hisname@company.com      Manufakturer      Sweden
hisname@company.com      Cunsultant                      Sweden
hisname@company.com      Enduser                      Sweden
hisname@company.com      Enduser                      Norway
hisname@company.com      Enduser                      Danmark
hisname@company.com      Enduser                      Finland
othername@another.com      Manufakturer      Finland
othername@another.com      Enduser                      Sweden
othername@another.com      Cunsultant                      Sweden
othername@another.com      Manufakturer      Sweden
othername@another.com      Cunsultant                      Sweden

The target is to have one record and add the different info on groups and countries into the other field like:

hisname@company.com             Manufacturer Consultants Enuser         Sweden norway denmark
othername@another.com           Manufacturer Consultants Enuser         Sweden finland

It is different amount of lines for everybody Many are just once and others can be many times but as I said the target is to keep info on one line.
It is not neccesary to remove the duplicates in this script. That could be done in another script afterwords if the lines are Identical.
Thanks a lot
 
0
perbackman
Asked:
perbackman
  • 3
  • 2
1 Solution
 
rogierCommented:
I presume that you collect all the new records in a new table. add a global field where the script stores the email address (set field ...) . Then try to build a script with the following components:

1. store base info
sort your records by email address, go to the first record, store the email address of that record in the newly made global field.

2. find the relevant set of records
the script performs a search through the original set of records, searching for any record that has the email address you just stored in the global field.

3. add data to the new record
Make a loop through the current found set, and for every record add the content of the country field to the country field in the record you are building (the one in the new table)

4. find the next set of similar email addresses
At the end of the series of records, exit the loop, omit all records that have an email address similar to the one in the global field, go the the next record, and start over the script.

If you need real syntax, let me know.
you write you're a user interface man. So am I. Would you mind to share some of your work? You can send PDF if you prefer. I'll do the same.

good luck!
0
 
perbackmanAuthor Commented:
Hi, Thanks
I will try that this evening. What timezone are you in?
0
 
rogierCommented:
GMT+1 at the moment at least.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
lesouefCommented:
I'll review my previous example for this case if you don't like rogier's way, just let me know.
about the - and _ taken as word separators, this is true for all languages unfortunetaly.
what you can do as a work around, is replace all of them with a character which never exist in emails, like £ or µ, run the script and replace the other way around to restore the proper characters. not very smart, but the word separator is not programmable in fm. You can also avoid the word function and extract words using characters untill the first space encountered using the position function, but that makes it complex, though it can be done by purists!
0
 
perbackmanAuthor Commented:
Thank you both.
Filemaker gives you many ways to do things.
I made a selfrelation, added a portal with info from the related once  in the portal. Than I processed the duplicat posts by copying the lines in the portal to a singlefield in the mail table. Found out to make the looping through all duplicats.
OK It was some hands on. Had to find out the once wih 2 duplicats run the script, find out the once with 3 duplicats modify the script and so on. Bu I also found out about the variable scripting. This is a fine feature.
Guys, Thank you.
 
0
 
perbackmanAuthor Commented:
Some points to rogier
Thanks it gave me the ideas.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now