Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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

Posted

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.

Posted

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

Posted

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

Posted

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

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