Jump to content

One to Many relationship My brain is MELTING


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

Recommended Posts

Posted

I have 3 file setup:

Events

Lists

List Items

Relationships are:

Lists to List Items by List ID

Events to Lists by Event ID

The Lists file contains records in a portal from List Items. I need to relate multiple list records to single event. I would like to create a script in the Events file that creates a new list with the current Event ID. This would be assigned to a 'new list' button in the events file. I would like the lists file to use the same Event ID until a new event is created. This is the same type of relationship used between the Lists and Line Items file. Without the a poral(I don't want to use one)I'm lost. I know this is probably a dumb question, so I apologize in advance for the ignorance. I'm new at this.

Thanks

Posted

The hard way:

Create a global ID field in the Lists file. Set the EventID field in the Lists file to auto-enter the contents of the global field.

From the Events file, create a script that copies the EventsID, then performs an external script in Lists that creates a new record.

Note that the last entry into the global ID field will remain, and be used for any List records created, until you change the ID (like, by running the script from Events).

Now the easy way:

USE A PORTAL!

Posted

I kind of see what you're saying. But what is the point of a global field? Why can't I just copy the Event ID and paste it into the event ID of the lists file?

Also, how would I use a portal if I dont want to diplay the contents of the List file? I can use a portal for list_items because I want to actually create records on the lists layout. I don't want to do this with the events file. I just want the lists to have the same event ID as the event ID in the events file.

Does this make sense? Maybe I've got things mixed up in my head. Like I said, I'm new at this.

Posted

By using a global field, you keep the EventsID available, without having to copy it every time you create a new List entry.

By using a portal (perhaps in a separate layout nobody else sees), you simplify data entry. It makes your life easier, so why not do it?

I understand your resistance to doing things a different way from what you originally envisioned, but take my word for it, this will not only make the current job easier, it will make future jobs vastly easier.

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