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

Setting a field, when the value is from another DB


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

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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