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.

Set Field Scripting Question that's driving me crazy

Featured Replies

I'm very new to Filemaker, but up until now I have found the program quite intuitive. Here's my dilemma:

I am trying to automate the process of adding contact info for artists when we create a new event (concert)

There are two layouts involved the "events" layout which has details of the event including the artists, the time, the date, the program, tickets sold..etc.

There is also an Artists Layout which gives the details of the artist:Contact Info, Myspace Page, Photos, etc.

Here's what I'm trying to do. When an artist name is entered in the "headliner" field on the events layout, if the user clicks a button it will activate a script that creates a new record in the "artists" layout and the "group name" in that layout will have the text from the "headliner" field in it. Here's the script that I thought would work:

Go to Layout ["Artists" (Artists")]

New Record/Request

Set Field [Artists::Group Name; Events::Headliner]

When I run the script I get a New Record, but it's empty, "Group Name" doesn't show up...

It's driving me crazy. Is there a relationship that has to be set up first, for this to work. I can make it work with copy and past, but I don't want to use those functions.

Any insight would be much appreciated!

You need to capture the "Headliner" data before you create the new artist record if there is no relation between the tables:

Set variable $headline with artist name

Go to Layout ["Artists" (Artists")]

New Record/Request

Set Field [Artists::Group Name; $headline]

...and welcome to the forums

  • 4 weeks later...
  • Author

Thank you so much! Worked like a charm.

Although this works, it is very poor design because it relates tables using text values rather than unique numerical keys.

Each Artist in the Artist table should have a unique numerical ID (an auto-enter number field, Artist_ID).

An Event would have in its Headliner field, an Artist ID. I suppose each event has only one Headliner, but can have more than one Artist. Therefore, you need a table that stores the join between Events and Artists. In this table, you could mark a record as the Headliner.

How are you determining if it's a new Artist to your system when you specify them as the Headliner? It seems that there's no check.

  • Author

What you are saying makes sense. What I had done is set an autofill from the "artists" layout in the headliner field. I also have a script that when someone types a new artists name in the headliner field, an new window opens with the "artists" layout allowing the details of the artist to be entered.

If someone doesn't spell the artists name correctly or leaves out a "the" there will be duplication, but I think that could happen even if I created a unique ID.

I typically have a user Find before they are allowed to create a New Record. Duplicates will still happen, but they're reduced.

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.