greenfields Posted March 3, 2009 Posted March 3, 2009 I have a database that contains a table called "Emails" with a field called "message". Each record has a serial number. I have another table called "keywords" with the field "keyword". I have another table called "stats" which has fields "keyword" and also "serial number" There is a relationship between "Emails" and "stats" via the serial number field. I have written a script that takes the first "keyword" from "keywords" goes to the first record in "Emails" and searches content for a patternCount. If Patterncount >=1, a new record is created in "Stats" that copies the serial number from "Emails" and inserts the "Keyword" into "keyword". It then loops through all keywords in each email generating multiple records in "Stats" I have set up a portal in "Emails" so i can see which of the keywords are present in that record. I am now trying to write a script to show me "more like this" ie, i want to go to the stats table, and generate a found set matching only the keywords from my portal. Hope this makes sense.... any help appreciated!
bcooney Posted March 3, 2009 Posted March 3, 2009 If you use the List () function in a calc field, you can gather the related keywords in the portal. Then use gtrr to "show more like this."
greenfields Posted March 3, 2009 Author Posted March 3, 2009 many thanks! do you think you could give me a very basic example??
bcooney Posted March 3, 2009 Posted March 3, 2009 No time for a demo, but how about creating the List calc. In Emails table, create a new calc field "KeywordsAll" = List ( emails_STATS::keyword), result text. Now build a relationship from EMail to Stats using KeywordsAll matching Keywords. Then you need a button on Email that gtrr thru this new relationship to a STATs list.
comment Posted March 3, 2009 Posted March 3, 2009 (edited) How about: Go to Related Record [ Keywords; Show related only ] Go to Related Record [ Emails; Show related only; Match found set ] Edited March 3, 2009 by Guest Fixed a mistake in table name
bcooney Posted March 3, 2009 Posted March 3, 2009 I thought he wanted to end up looking at Stats records. If not, yours is certainly the way to jump back to all emails that also have the target keywords.
comment Posted March 3, 2009 Posted March 3, 2009 I am sorry, I had mistaken the table names. True, I took "show me more like this" to mean "show me all e-mails with at least one common keyword with the current one". I am not sure what one would see gazing at a list of records in the join table, but if one wanted to, then: Go to Related Record [ Keywords; Show related only ] Go to Related Record [ Stats; Show related only; Match found set ] should do it.
bcooney Posted March 4, 2009 Posted March 4, 2009 Very good, yes, he could just jump thru relationships. But you bring up a good point--why?
Recommended Posts
This topic is 6085 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