apwalton Posted October 19, 2004 Posted October 19, 2004 I am importing folders full of images into my db. Some fields related to the photos will have the same value for all photos in the folder. Is there a way to specify a value that will be set for all records in that import? If not, how do I set a value across multiple records in one action?
transpower Posted October 20, 2004 Posted October 20, 2004 Have two tables: 1) folder 2) photo. The primary key is in the folder table; the foreign key is in photo table. The fields which have the same value for all photos in a folder belong in the folder table. This is a one-to-many relationship (parent to child) so your Relationship Graph should reflect that.
Ender Posted October 20, 2004 Posted October 20, 2004 Try the Replace command to set a value in a field for the found set. If this is to be used in a multi-user environment, then a Set Field script step in a loop is better as it allows for error trapping if a record is locked.
apwalton Posted October 24, 2004 Author Posted October 24, 2004 After using the import function many times I don't think that it is possible to populate fields other than things like photo name, path etc (when importing a directory full of images). In SQL, I would want to do a UPDATE photos title = 'new title name' WHERE photo_category = 'oregon' That is the kind of operation I am needing to do. Sorry - I'm a Filemaker newbie so the suggestions above don't male sense to me.
QuinTech Posted October 25, 2004 Posted October 25, 2004 Hi, apwalton. The UPDATE command in SQL is almost exactly analogous to the Replace Contents script step that Ender suggested. Make sure you use Replace Contents and not Perform Find/Replace. The script would first return a found set (perform a find for "oregon" in the field photo_category) and would then replace the contents of title with "new title name". Jerry
Recommended Posts
This topic is 7725 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