Jump to content
Server Maintenance This Week. ×

One to Many Relationship Without a Portal


cj247

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

Recommended Posts

Very Simply, Two databases. One for movies one for theaters. A movie is playing at multiple theaters (a theater hosts multiple movies, for that matter, but I'll keep my question "bite-sized"). I want a field to list these theaters (theater 1, theater 2, etc). I have a list of the theaters in a portal, but I need to format an export that is a comma delimited list.

Anyway, I stripped down my examples to the bare minimum, I hope that someone can help, thanks in advance.

FileMaker Version: 5

Platform: Mac OS 9

Link to comment
Share on other sites

That icon looks familiar...

Create a Global text field in theater. Use a script to loop through each record, appending a comma and the theater to the global.

Set Field [ gTheaterList , gTheaterList & ", " & theater ]

Link to comment
Share on other sites

Thanks for the response, although I'm still a little confuzed.

"Use a script to loop through each record" I'm assuming a find script based on movie titles (I guess ID's would work better). So that, I get.

"Set Field [ gTheaterList , gTheaterList & ", " & theater ]" is what has me scratching my head. What is gTheaterList? (Global Field Theater List, I'm assuming) What is the process by which it keeps repeating itself?

Thanks again for the help....

Link to comment
Share on other sites

A script like this is used to build the global with all the records' values from the theater field.

Go to Record/Request/Page [ First ]

Set Field [ gTheaterList , theater ] //sets the first theater in the global

Loop

Go to Record/Request/Page [ Exit after last, Next ] //goes to the next record

Set Field [ gTheaterList , gTheaterList & ", " & theater ] //sets a comma and the next theater in the global

End Loop

The result will be "a field to list these theaters (theater 1, theater 2, etc)" in comma separated format.

Link to comment
Share on other sites

This topic is 7303 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.