Jump to content

Need to tell FM8 to nav to record, and perform script


BowDown
 Share

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

Recommended Posts

#

'# This script will open FileMaker and run the Fax Script

'#

Set FMApp = CreateObject("FMPRO.application")

Set FMDocs = FMApp.Documents

FMApp.Visible = True

Set myOpenFile = FMDocs.Open("orders.fp7", "Admin", "")

myOpenFile.DoFMScript ("sbtSaysUpdateConfSendApprovalSheets")

Now how can I tell FM8 to navigate to a specific record. The program thats going to be calling FM8 knows the jobkey to have FM8 search for. This will be a unique record. I just need FM8 to navigate to this record, then call this script.

Thanks.

Link to comment
Share on other sites

At that point its already in the script? How is it then going to know what key the program wants to run the script on?

I have to navigate, or search for the record so that when the script is run it will be using the correct information.

Link to comment
Share on other sites

At that point its already in the script? How is it then going to know what key the program wants to run the script on?

I have to navigate, or search for the record so that when the script is run it will be using the correct information.

What's your find criteria? You can trigger the script once you are at the record and use Get(ScriptParameter) where the Get(ScripParameter) could be the record ID or whatever you usually use to locate the record. Please provide a step by step procedure of how you are currently working.

Link to comment
Share on other sites

Enter find mode

populate the jobkey field (text)

perform find (it only returns 1 record.)

the script then uses this record, and switches to a different layout, prints to pdf, switches to another layout, prints to pdf... then the 2 pdfs are attached to an email, and emailed to the dealer automatically.

I need the accounting software to call filemaker, and somehow tell it to search for the jobkey its currently processing, and run my script that emails the pdfs.

Then do it again for the next jobkey.

Link to comment
Share on other sites

One of the biggest limitations of the FM ActiveX model is that it does *not* allow to pass data to FM.

Your problem could be solved easily if we could pass a script paramter while calling DoFMScript, but alas.

That leaves us with 2 options of getting your JobKey into FM:

- paste. If your app has access to the clipboard then you put the jobkey on the clipboard and call a script in FM that goes to find mode and does a paste (FM has a paste script step). Might not be an ideal approach if the users have their own data on the clipboard

- import. Have your app write the jobkey to a text file and call a FM script that imports that into a global with the "update" option (to avoid creating new records).

Link to comment
Share on other sites

This topic is 5723 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
 Share

×
×
  • Create New...

Important Information

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