Jump to content

set field issues - please help


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

Recommended Posts

I'm still learning my way round filemaker relational tables and i have found this forum great help but I have hit a wall :)

I have a contacts table and a quotes table and I want a "new quotes" button on the contacts page so that when you hit the button it takes you to the quotes layout and populates the contact id fk field (so that you dont have to enter the contact details again.

A helpful soul on this site sent me a sample file and it worked exactly how i wanted and i have studied it over and over again but even though I think I have set mine up in the same way it does not seem to work.

Can you please take a look at the attached file and see where I am going wrong?

thanks.

promos-lite.fp7.zip

Link to comment
Share on other sites

Don't have time to look at the file but best bet is that you dont have allow creation of related records on in the define database relationships window (b/w your two Table OccurnaceS) (i'll take a look tommorow if you haven't worked it out yet)

Link to comment
Share on other sites

that works great - thanks a lot.

could i ask you one more favour if you have a minute?

I'm not learning anything by just using your script unless i understand it. Could you explain the first 2 steps so i can use them in future - especially what $CntID is

Thanks.

Edited by Guest
Link to comment
Share on other sites

$CntID is a "variable"... It acts as ummm.... a pointer to a value that you give it...

For example, if you were to set $CntID to the value of your field, using the SetVariable[] Script Step, and then later reference $CntID, you will be retrieving the value that you gave $CntID

So If you use

Set Variable[ $CntID ; MyTable::MyField ]

# Here, $CntID takes on the value of MyTable::MyField at this point in time

Go To Layout[ SomeOtherLayout ]

Set Field[ MySecondTable::MySecondField ; $CntID]

# Here, you are setting MySecondTable::MySecondField to be equal to the value we stored earlier in $CntID (which happens to be equal to the value in MyTable::MyField).

As for my original suggestion, i thought a different method was being employed to create the related records, so just discard the comment.

Link to comment
Share on other sites

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