Jump to content

Table-Based Value List: Can't Retain Names Entered On-The-Fly


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

Recommended Posts

Hi everyone, I need some help creating a drop down menu. I’ve read several threads in this forum about it, but I’m not grasping the concept. I’m probably overlooking something simple, so I just need a nudge in the right direction.

It’s a movie database, and I’m adding a drop down menu for directors. I created a table just for the directors, and then created a value list based on that table. I did that because I’m going to be entering several movies with the same director, such Woody Allen, Stanley Kubrick, etc., so I can just open the drop down menu and select their names.   As of right now, it works as intended.

But I also want to be able to add names to the list on the fly. In other words, I want to add a director’s name each time I add a new record, if the director's name is not yet in the list. This works, in the sense that the director’s name remains in the record after I type it in.

But the director’s name is NOT added to the drop down menu. In other words, if I add the movie The Seventh Seal, and type in Ingmar Bergman into the Director’s drop down menu, his name is retained in the record. But if I then add the movie Persona, and try to get the name Ingmar Bergman from the drop down menu, the name does not appear.

This is where I need a bit of help. How do I get the name Ingmar Bergman to be added permanently to the director's list?  Am I going about this wrong? Should I be using a different procedure to create the director’s list? It does not seem practical to create a custom value list.

I’m attaching a copy of my test database for this.

Thank you, everyone. PT

Filemaker - Edit List Test.fmp12

Link to comment
Share on other sites

You have no mechanism to add a new director to the Directors table. 

One way is to add a relationship from Movies to Directors ( Movies::Director = Directors::DirectorName ).

I changed your field name from DirectorList to be more descriptive --you are obviously going to add more information about each director in the table.

Create a script AddDirector:

If [Count ( Directors::DirectorName ) = 0 and not IsEmpty(Movies::Director ) ]
	Freeze Window
	Set Variable [$addDir; Value:Movies::Director]
	Go to Layout ["Directors"]
	New Record/Request
	Set Field [Directors::DirectorName; $addDir]
	Go to Layout [original layout]
End If

Attach an OnObjectExit script trigger to the Director field in Movies, and point it to AddDirector. When you exit the field after adding a director, the script checks to see if the director name is already in the Directors table, and if not, add it.

This is a very rough solution as there is no way to prevent multiple entries for misspelled names, but the basic principle will get you started.

Link to comment
Share on other sites

I really don't want this database to be relational.  I don't think it needs to be.  One movie, one director (some movies have more than one director, but I have ways of dealing with that), one genre.  

(As for actors, if anyone reading this is wondering...I've deliberately left out any reference to actors.  I'm creating a separate database for actors, which will be relational.  One movie, several actors.)

Let’s take this in a different direction. Let’s try this, instead:

I have a Microsoft Word document with a list of approximately 600 movie directors.

I have a table named Directors, with a text field named Directors List.

Can I paste that list into that table/field, and base the Value List on that field?

Is it possible to do this? I’ve already tried, but I noticed Filemaker doesn’t have a Paste Append option. Microsoft Access does, and it allows me to paste multiple lines into a form or table. I can’t do it with Filemaker. When I select a portion of the list and copy it to the Clipboard, then try to paste it into the table, all of the pasted data is entered into one record in the field. Obviously, that’s not what I want.

So, how can I do this in FileMaker? If I can find a way to paste these 580 lines into the field, then it will make it much, much, much easier for me to have a Director drop down menu.

 

 

Link to comment
Share on other sites

Can't you just import the text file of these directors' names? This will give you the one name in one field.

Surely, if you use all these names in a drop down list/menu that list will be rather long and unmanageable?

Link to comment
Share on other sites

On 3/31/2018 at 9:27 AM, Peterteneldas said:

“I really don't want this database to be relational”

I don’t Understand this. If this is true why use a tool like FileMaker?

Edited by Lee Smith
Separated the question and answer from the quote
Link to comment
Share on other sites

22 hours ago, Rick Whitelaw said:

I don’t Understand this. If this is true why use a tool like FileMaker?

Well, because I'm not really very knowledgeable about database design, and felt what I am doing is simple enough to make this a flat-file db.  I'm realizing I'm not right about that.

Link to comment
Share on other sites

I think I made a breakthrough with this.  I just created a test relational database, with a portal, and I got the portal to work.  To a point.  I've run into a snag.  But I have a gut feeling it just requires a minor tweak that I might need a touch of help with.

I've come to the realization that a flat-file database is just not going to work.  I see now how building relationships will be far more advantageous and efficient.

So how about we close this thread.   I do need a little bit of help tweaking the portal I just designed, but perhaps it would be better if I start a new thread for it?

 

Thank you, everyone.  

 

Link to comment
Share on other sites

Hi Peter,

Leave this Thread opened until you say to yourself, I GOT IT! It works the way I want it to.

Use this Thread for your follow up tweaking.

Post a copy of your file for this help.

Lee

 

Link to comment
Share on other sites

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