Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Bulk Adding New Child Records

Featured Replies

Hello,

I'm new to filemaker and am trying to understand the capabilities. I'm an experienced developer, but see using filemaker as a way to jump start some database projects for my client.

I have a scenario that I can't figure out how to approach it in filemaker.

I have a 1 to many relationship between a person and daily activities. Each day, the client wants to be able to log daily entries for people. this part is obviously easy in filemaker.

They also want to be able to batch add records for daily entries. For example, select 3 people and log and actvitity to tie to each one like I pick Jill,joe,James and log a running activity for today. This would allow them quick data entry as they can have dozens of people to log entries for.

I figured that a script would be the way to go with this, but I don't know where to start. I can't find any senarios that would match this example. I figured I could build a layout to show all the people and have a picker for the date and the log entry, but how to allow the user to select many people and commit that information is not clear.

thanks for any advice you can send my way

Roughly:

Have a portal showing all people. Select the people by clicking a button in the portal; this would add (or remove) the PersonID to a return-separated list held in a global text field.

When completed, go to the Activities table and loop on the list.

  • Author

Thanks for the input.

When you mentioned this:

When completed, go to the Activities table and loop on the list.

do you mean to fire off that loop through Activities on a button click, and the script would loop through the global text field of the person IDs adding new activities?

Thanks

You would have your list of IDs in one field, and another field to type in or select the activity. Then you would hit a button that would run the script. The script would go to the activities table, create a record, set the activity to whatever you typed and the person ID to the first value in your list of person IDs, then it would run again, creating a second record, setting the activity, etc....

For example:


Set Variable[ $persons ; People::selectedPeople ]

Set Variable[ $activity ; People::Activity ]

Set Variable[ $i ; 1 ]

Go to Layout[ Activites ]

Loop

  Exit Loop If[ IsEmpty( GetValue( $persons ; $i ) ) ]

  New Record / Request

  Set Field[ Activity::PersonID ; GetValue( $persons ; $i ) ]

  Set Field[ Activity::ActivityDescription ; $activity ]

  Set Variable[ $i ; $i + 1 ]

End Loop

  • Author

thanks again for the example, I will try to hook that up.

One more question. will this type of layout and script render and run in the ipad version and php sites (in filemaker server)?

thanks again

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.