Populating a Portal from a Value List


Occasionally when developing in FileMaker I come across the need to be able to quickly generate a standard set of items from a Value List. In this example, using one of FileMaker’s built-in templates for Projects, I imagined a scenario where a project had a standard set of steps that needed to be generated whenever a new project was begun. Here is a quick and easily modifiable script to populate a FileMaker Portal from a Value List.

Projects example: Populate Tasks

Click the Populate Tasks button

The Value List for Tasks is Auto-generated in the Task list

Tasks Value List

In order for this to work, a Value List is required. Another approach would be to simply enter the list of values into the variable for the $List in the script that follows.

Manage Scripts

Select the ‘Populate Portal from Value List’ script.

Populate Portal Value List script


To use this script in your own solution, paste it into your file and modify three things.

  1. Modify the Value List from ‘Tasks’ to whatever is appropriate in your solution
  2. Change the field in the target portal you wish to write to
  3. Update the Set Field step to the appropriate field.

Make sure ‘Allow creation of records in this table…’ is set in the relationship.

Advertisements

Comments are closed.

%d bloggers like this: