How do I set default values in custom fields?

<< What built-in field mappi ...
Back to Portfolio FAQ index
Can I base Field values o ... >>

Manual: v5 - page 184, v6 - pages 127-128

"I regularly add heaps of images from a particular source and it would be so much easier to simply change the defaults before adding items rather than having to select images then using replace......"

If you are prepared to do scripting (VB or AppleScript) you can programmatically create a variant of placeholder records of the type you require that will have default field entries. For ease of use you should increment the filename field info even though the (hidden) Record ID field would ensure duplicate filename Records wouldn't clash.

Using placeholder records from within the Portfolio you can create a generic record but there seems to be no way to copy the record or to change the record's (file's) name as you need access to the non-existent original image file to do this. Well, there is a way to do this, though it's more a work-around than an built in function of Portfolio. If you know how to script, I'd go that way, but here's the "poor man's" method!

BTW, I worked through this method in Windows using Notepad but on the Mac you use (?) SimpleText - the principle should be the same. Actually you can use any text editor of choice but note you must save plain text and not RTF.

1. Create your placeholder and add the 'default' values, or take an existing image record as a model and amend that. You can set any custom Fields but of the built-in ones only these two - Keywords & Description - all other built-in fields are (re-)populated when the images are added.

2. Make sure your 'master' reference record (step 1 above) is the only record selected.

3. Select "File -> Export -> Text File...". Select the Fields to export - the Filename plus those you set up in step 1 above.

4. Choose a name and folder to save the data. Read the v5 manual on page 184 for more detail on the process and file format produced. The first line of your text file is the field names of the Fields selected for export. The Field data on each line is tab delimited and each line is ended by a carriage return. Each successive line (after the first) is a single Record's data. Line breaks (e.g. in Descriptions) uses ASCII Chr #11 and multiple keywords are delimited with ASCII Chr #29 - see manual for detail.

5. Switch to Notepad/SimpleText and open the file exported at step 4 above. you should have 2 lines of text, e.g.:

   Filename      Description      Keywords   [etc.]
0027950B.TIF Lorem ipsum est Testword [etc.]

6. Ensure the last line of the text has a carriage return. A number of Portfolio's export routines have a bug whereby the last line is not terminated correctly with a carriage return. This bites when you re-import as the last Record is not imported (although you get no warning of this!).

7. Now select line - the Field data - and copy and paste it back in as many lines as you have placeholders that require default Field values.

8. Return to the top of the file and change the filename in each line so each line has a single (different) filename - one of each of your placeholders. [You might want to prepare here by producing a reference list of filenames to read, or cut & paste, from].

9. Check your last line has a carriage return (see step 6 above) - just making sure! Save the file.

10. Now, in Portfolio select "File -> Import -> Field Values..." and find the file you saved in step 9.

11. The 'Import Fields Value' dialog pops. See the manual pages 179-181 for how to use it. Note that you can only import Custom Field data plus that for the built-in Description and Keywords fields. [This is poorly explained in the manual] Set the Filename Field as the 'key' (check - you did use exactly the same filenames in the text file as the for the placeholder's, didn't you? - if not return to step 8 above and repeat).

12. Click Import. If you want, save the import template (see page 180 of the manual for more on this).

13. Do a find for your placeholder files and set a view that shows the Fields you updated. They should now be populated.

If you are able to do scripting you can use the above procedure as a process around which to code and automated process.

Question: How do I set default values in custom fields? [FAQ00027.htm]
Last Update:- 01 June 2006

<< What built-in field mappi ...
Back to Portfolio FAQ index
Can I base Field values o ... >>

Quick Search of PortfolioFAQ (word, words or phase): or try the Advanced Search

User-to-User Forums  |  Report error/typo/broken link  |  Request new topic  |  Ask a question

Site and articles © Mark Anderson 2001-2007 - Visit my home page

This FAQ is created and maintained using
Friday logo
Friday - The Automatic FAQ Maker