Skip 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.

Setting a field, when the value is from another DB

Featured Replies

This is related to my other post. I am setting a field in one database, using a value from another field, in another database. These 2 fields have a relationship. It wont work though, do I have to perform a find first?

If you could explain how to do this, I would be very greatful.

--Mark

Assuming your relationship is valid, this should work:

Set Field [fieldA, related::fieldB]

It only works in Browse mode, maybe that's the problem? If so, set the value into a global field, then you can use it in Find mode.

  • Author

Its not working. As a test, I put :

Set Field [fieldA, 55]

That field gets populated with 55. then when I go back to the relation, and the correct field, it will not work. Both are set on browse. The relations are correct, and they are both numbers, that are indexed. I really dont have any clue why it isnt working. This is in a script no the second database, calling a field from the first. First it creates a new record, then this set field.

frown.gif

  • Author

I even went back, and set the relation both ways. Wish I knew what was goign on here!

  • Author

Anyone else have any ideas?

Something to do with circular logic?

--Mark

Hi mark

First of all, this is not a test of a relationship.

[color:"blue"]

> Its not working. As a test, I put :

> Set Field [fieldA, 55]

Check the basic of your relationship.

Are you in the Current (Master) trying to create this script?

Do the fields in your relationship "Match".

Are you calling the right relationship in your set field step.

FileMaker uses these terms to help kept these things straight.

The Current or Master file is the database where you want to see the information. In your case bring the information into with the set field script

The Related is the database where the information is now.

In order to establish a valid relationship in your Current File, you also have to have it based on matching fields. Do these fields match?

HTH

Lee

smile.gif

Hi,

If this thread is related to the one where you had problem to "export" the group attached to a Person in a Membership database....

....then you would likely look to relationship rather than a script.

Even if there are better settings IMHO, here is an attachment that shows how it could work.

If I understood the problem

crazy.gif

groupToMember.zip

I would test this with a GTRR script (i.e. Go to related records) and be sure to check the "show only related" checkbox.

Note that if there are two or more related records, the field will be set to the first matching related record. This can vary depending on whether or not your relationship has a sort order specified.

Is it possible that the first matching record in your case is blank?

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.