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

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

Recommended Posts

Posted

hello,

not sure if this is the best place to post this but i can;t see anywhere better (prob as i am not too sure if it is possible)

I have a page which i can enter a value in and select FIND then that takes me to a result list. I need to then take the result from that list to another page. I have the following:

Copy [select, "Product Code"]

Perform Script [subscripts, External: "Order Details"]

Which i thought would take the value and then direct me to thepage. But obviosuly i need to set the value in the new page as well..

if anyone has any advice on how to do this it would be appreciated.

thanks

RF

Posted

I moved this to Scripts

Since this seems a continuation of the other question in General Topic v6, Lets hold off on answering this question until we resolve the first one.

Lee

Posted

Any chance anyone could give me a clue on where to start with this one?

I have an idea that i would like to try, if only a learning experience. But i need to know how to "pass" a variable from one page to another.

If anyone could help me here that would be appreciated. I think it might help me understand how this is all working.

Many Thanks,

RF

Posted

Are trying to get the related record? If so, instead of copying the field, set your script to "Go to Related Record" and just specify which layout and table you're wanting to see.

Posted

hi,

no i am not wanting to see a record. I am wanting to take a record_id of a product and pass it to another page which has a purchase order on it and add it to that purchase order. which i presume is slightly different...

thanks for your reply.

RF

Posted

The major problem is you use of the term "page". FileMaker Pro doesn't have "pages" it has records and layouts.

In my experience, beginning users usually refer to layouts as "pages". Layouts are athe designs used to display records. You can choose which table a layout displays, and the fields from the table that appears on the layout.

Posted

No one has mentioned globals yet, so I will. Since your profile says FM5, you should look into creating a global field in your starting database file, which you can then reference in your destination. In essence, you park the value from the starting database file, and then retrieve it in the second. Because it's a global value, it will persist even after you leave the starting file.

HTH,

David

Posted

Globals in FMP 6 and earlier don't carry between files (tables), they only carry data between records. To move data between files the files need to be related, even if the relationship is based on a constant (ie, a cartesian join).

Posted

Thanks Vaughan i think that is the most useful thing i have got so far !! :)

I think i was calling them pages because they are seperate "files" in the db directory but as i now understand it i want to pass a value between layouts !! Ok..a step closer (albeit a small one!!)

As i want to carry between files (tables) i guess i can't use t-squares suggestion..so what is the alternative??

many thanks, i feel i have a mustard seed of understanding here now...just gotta make that grow !! lol

RF

Posted

Vaughan--

The technique I always used in FM6 and earlier was to set a global in my starting database, which I could then "pull" from the destination database. (Alternatively, you could push the value forward into the destination database).

So, you're right, I'm not carrying the data from one file to the next; I'm making it available for retrieval from the destination. That's what I said in my original post. The end result is pretty much the same. I get the value of the active ID in the first file moved over to the second, which is what Mr. Frog was after.

I did make the assumption that the two files were related in some way. Perhaps Mr. Frog didn't know this, though, so, thanks for bringing it up!

Here is an example:

I have a button on a Clients.fp5 layout to add a payment. The payment data is in a separate Payments.fp5 file, and naturally, I want the CustID to be transferred to the destination so that the payment is linked to this customer. The button in the Clients layout is attached to a script (AddPayment) with the following commands:

# Script - AddPayment

Set Field["_g_CustID", "CustID"]

# Calling Payments script SetPayment ...

Perform Script[sub-Scripts, External: "Payments.fp5"]

Then, in Payments.fp5:

# Script - SetPayment

Go To Layout["Enter Payment"]

New Record/Request

# Note: relies on relationship in Payments that

# is called Customers and links to Clients.fp5 via CustID

# -- that is: Payments.fp5::CustID=Clients.fp5::CustID

Set Field["CustID", "Customers::)_g_CustID"]

This has always worked for me. (It also works for other things, like showing all the payments linked to a client--just change the destination script to perform a find using the global for the search critera).

David

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