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

Script Workspace and Script Triggers

Writing efficient automated tasks with scripts, managing complex business logic, passing parameters, debugging and error trapping.

  1. I'm writing a script to insert a PDF into a container field. I've captured the file name and path as a var ($filename) prior to creating the PDF. If I use the Insert Picture step, I get a "file not found" error, even though the file name and path are correct. Using Insert File instead, the file is found an inserted into the container field with no errors. However, I need the actual PDF displayed in the container field (as opposed to a file reference, which is the result of using Insert File) and I believe Insert Picture is the only way to achieve this. For the life of me I can't figure out why $filename works for Insert File but not for Insert Pic…

  2. Hi folks, I've got a script, the majority of which is running fine. The only issue now is the PDF creation - here's what happens. A PDF is created, and opens fine. It gets sent out to a client, and only some clients can open it - others are unable to. However, if you use the 'Save PDF' option from a print dialogue box (as opposed to the Save PDF script step), the PDFs can be read fine. I've had a quick look at the files using Linux/OSX's 'file' command. Here's what i've found: 1.3 - saved from print dialogue 1.4 - saved as v5+ 1.5 - saved as v6+ 1.6 - saved as v7+ The number on the left is the version of Reader for which the PDF whi…

    • 3 replies
    • 4.2k views
  3. Hi, How do I pass global variables into a calculation to create text in a field? This is the part of the script where I set a field with text and global variables set in an earlier part of the script: Set Field [project_PROJECTNOTES::Description; "New sales order " & "$$ProjectSalesID" & " created. (Quote status: " & "$$QuoteStatus" & ")" ] This is the result I get in browse mode: New sales order $$ProjectSalesID created. (Quote status: $$QuoteStatus) Is it possible to do this or do I need to approach it differently? Thank you for your help!

    • 2 replies
    • 1.3k views
  4. Started by Archit3kt,

    I've got a "companies" table related to a "contacts" table via these fields: (companies::k_ID_company) related to (contacts::kf_ID_company) In the "contacts" table I created a "Company Name" field that's a drop-down menu, with the values list from (companies::company_name). I want to make a script (triggered by selecting a company from the list) that finds that company's record in the "companies" table, takes the value from the ::k_ID_company field, and sets the value of contacts::kf_ID_company to match. In effect, the user would create a new record in "contacts", then select what company the person works for, and upon selecting that company it assigns the cor…

    • 10 replies
    • 1.1k views
  5. Started by Sam Laundon_58915,

    I have a field that contains Exif Data from photos and I would like to be able to create a script that extracts just certain lines of text. Example: Maker: Panasonic Model: DMC-GH2 Software: Adobe Photoshop CS5 Macintosh Exposure Time: 0.04 sec. = 1/25 sec. f-number: f 5.3 ISO Speed Rating: 400 I would like to extract line 1, 2, 4 and 5 and insert each line into separate fields. How would I do this? Thanks in advance for your help - Sam

  6. Started by imoree,

    Hey everyone; i am testing a script but after 1 iteration, i get stuck in infinite loop. I am lost for real. tried what little i know so far. here is code Set Variable [ $text; Value:"this is the name of my text" ] If [ Length ($text) > 1 ] Set Variable [ $text2; Value:$text ] Loop Set Variable [ $text2; Value:Left ( $text ; Length ( $text) - 1) ] Exit Loop If [ Length ( $text) = 1 ] End Loop Else End If Set Variable [ $text; Value:$text2 ] thanks -i

    • 10 replies
    • 1.5k views
  7. I know this is easy but I can't find it anywhere. I am writing a script that needs to say: If accessing through IWP do this but if accessing through remote do this. How do I write it? Thanks in advance!

  8. Hi all, Is there any way of knowing the current stacking order of the currently active scripts. Specifically, I'd like to know which scripts are running when a script lands on a layout or record and a layout trigger is fired. There are times when I want the triggered scripts to exit immediately if they are called by certain scripts. Thanks in advance! -Kent

  9. I don’t know much about scripting and I’m getting crazy with this. What I want to accomplish is to get related records of related records but when I get the related records of the first related record I can’t come back to the second "first" related record. Sounds weird I got months that has many exams that has many answers. I want the questions to be listed first and then the questions and it’s answers, like 1. Question... 2. Question... 3. Question... --- 1. Question... a) Answer... b )Answer... c) Answer... 2. Question... a) Answer... b )Answer... c) Answer... Everything goes fine but I can’t come back from the answers of que…

  10. Started by Dr. Evil,

    Looking for experienced advice on what (to do) and what (not to do) in this process. I have a tendency to over complicate things and give user too many options. Goal is to build a solid fail proof billing scheme and script. Below is the process up for discussion. Process Outline... General scheme for moving an Item through various billing states; "Estimate", "Approved" and finally, "Invoiced". When an Item is created, ItemStatus is automatically set to "Estimate" Once Item has been approved by Client, user then has to manually set ItemStatus to "Approved". This allows Item to be picked up for invoicing. After InvoicingScript has been ran, the s…

    • 7 replies
    • 2.1k views
  11. I created a script that is triggered upon exiting the field using the "Replace Field Contents" function. It works exactly as I need it to unless I select the "Perform Without Dialog" option. Then I get error 406. When I un-select "Perform Without Dialog" it works fine again. I have repeatedly tested this. When I do NOT select "Perform Without Dialog" the dialog comes up and I have to select the "Replace" button manually using the mouse. Since I will ultimately intend to "Replace Field Contents" on 10 different columns in the same script I am trying to skip the dialog without having an error. Any ideas?

  12. Started by ljensen1,

    Is there any way to format the body of an email using the Send Mail script step? (FileMaker 11)

    • 8 replies
    • 5.4k views
  13. Hey all, i am trying to find out how to get a result from a script - for this test, true / false, but i dont know how. //name of script is recursive add //script calls self If [Get (scriptparameter) ≥ 100] exit script[] End If New Record/ Request Perform Script ["recursive add"; Paramter: Get (scriptparameter) + 1] Exit Script [Result: Get(scriptresult)] my goal is to use scripts to test my custom functions but i am trying to figure out recursive scripts & tail recursive scripts . Also how to use the Get (scriptResult) in the correct context. -ian

    • 7 replies
    • 1.3k views
  14. Started by Shedboyxx,

    I tried to deal with this in Excel but came up lacking. I’m sure this involves a loop but it’s been awhile since I used a loop at all. I’m using Filemaker 11 I have an Excel spreadsheet that has about 350 CD Titles. Each CD has multiple tracks from 12 to 100+. So there are approx. 350 CD’s and about 12,000 total tracks (records). I have to come up with codes for each CD Title and then insert the code into every record (track) according to what CD they belong to. If I do this in Excel, I can filter by unique records and then manually apply the codes to every first occurrence of a CD Title – and then use drag pasting to get the codes onto all of the tracks. Very…

  15. To prevent the following message dialog ''Before Typing press Tab or Click in a field...'' on all of my layouts when a user types outside a field. I found this suggestion that appears to work: (I put it as a script trigger ''OnlayoutKeystroke'') If [code(Get(TriggerKeystroke)) = "27"] Exit Script [Result: True] Else If [isEmpty(Get(ActiveFieldname)) or PatternCount( FieldType ( Get(FileName) ; Get(ActiveFieldName) ); "Calc") > 0] Exit Script [Result: False] End If I have no programming knowledge at all so I tried to more or less paste this code. It does not do anything on my layout so of course I'm missing something. [Result: True] and [Resul…

    • 0 replies
    • 2k views
  16. Started by gseymour,

    I have a fairly strong development background but I am relatively new to FMP. I have developed a fairly complex DB which performs very well locally and via IWP. I am hosting my application/DB at a well known FM Hosting Service and have been very pleased with their service and support. I have only ONE script that is a problem. That Script uses the "Duplicate Records" function to create 40 records. It will never be more than 40 and may actually be a few less but for the sake of argument - it generates 40 duplicate records. I have done a lot of reading and I fully understand the issues around connectivity, block sizes, bandwidth, latency and most of the other fact…

    • 5 replies
    • 1.6k views
  17. Probably a basic question but I'm stumped. In my script there is a initial 'Run Script' or 'Exit' in my first Dialog .... but subsequent internal scripts have a 3 choices Dialog and choosing the second always ends up exiting the full script. How can I reset Get(LastMessageChoice) or clear it?

  18. Started by LeStew,

    Hi guys~ Might be a silly question but how can I define what a button does in the "Custom Dialog" script step? I've been able to make window pop up with a question. "Are you done with this record?" the buttons are then, "Yes or No." Ideally a yes answer would close the record, and likewise, a no answer would leave the record open. right now both buttons do the same thing, the next step in my script (which is close the window) Did I just miss a simple If/Then step? and boy it sure would be nice to be able to define that in the custom Dialog specifications box. Thanks again for everyone's patience and community knowledge. I be…

  19. Started by John.M,

    Hello, In a previous post I had requested a way to convert tagged text to color and or be stylized. I had a reply with the following calc: Let ( [ formula = Substitute ( "" & Quote ( text ) & "" ; [ "<RD>" ; Quote ( " & TextColor ( " ) ] ; [ "</RD>" ; Quote ( " ; 16646400 ) & " ) ] ; [ "<B>" ; Quote ( " & TextStyleAdd ( " ) ] ; [ "</B>" ; Quote ( " ; bold ) & " ) ] ; [ "<I>" ; Quote ( " & TextStyleAdd ( " ) ] ; [ "</I>" ; Quote ( " ; italic ) & " ) ] ) ] ; Evaluate ( formula ) ) I thought Text Color was always RGB but the above values aren't RGB. What color sp…

    • 2 replies
    • 818 views
  20. Hi to anyone that can help, So I am creating databases that are linked. I'm building this for some video/film editing work I have two database one for SEQUENCES one for SCENES in the SEQUENCES database I have fields for SEQUENCE #, SCENE FROM and SCENE TO (plus other parameters that are irrelevant). in the SCENE database I have SCENE #, SEQUENCE #, SCENE FROM and SCENE TO. What I want to be able to do is fill out the SEQUENCE list first with all the information then when I go into the SCENE database and enter SCENE # - for example scene 7, it will automatically enter SEQUENCE#, SCENE FROM and SCENE TO into the other fields, eg. SEQUENCE 4, FROM 5…

    • 5 replies
    • 848 views
  21. I have order management and order tracking system, both are separate Filemaker file. I would like to copy some order records when the order get completed, Here setvariable script will not help me to copy the records and paste to order tracking system... Kindly share possibilities to achieve this solution

  22. Started by godlysoup,

    Hi, Is there a script or something I can use to merge all records with the same ID? Or at least a faster way of doing so? Any feedback would be appreciated. We're using Bidder Central Live Webcast Auction Software through FileMaker Pro v. 6 if that makes a difference. The reason I'm merging them is so we can see a total spent amount. New here. Just started working at the Alaska Auction House a few weeks ago. It's a great place. They hired me on as their tech guy, to fix their computers and electronics when need be, and right now I'm trying to work through their database of customers. I have zero experience in this kind of thing, but I try to pick it up…

  23. Started by Ben Ball,

    I have been using Filemaker 8 adv and have started looking at Filemaker 11 adv... IN FM8 ADV I can click on tools and degug scripts and when the window appears with the script in I can click "edit" which allows me to directly edit the script that is related to a particular button. It does'nt seem that there is an option to edit the script in the same way in FM11 ADV? So how can I edit the script related to whatever button I press that has a script allocated to it? IN fact... the edit button is there... but it is greyed out... so I can't edit the script in question... TIA

  24. Started by DanMarks,

    Hi, My client can't doesn't want to get FileMaker server at the moment, they only have five users and sharing a database on FileMaker Pro is working well. However then need a backing up system. The host file is stored on a server, and I have been trying to work out a way to backup the file. I have created a save copy as script, but I can only get this to work by running this on the host machine. Is there a way to run this script from the client end without having to remotely access the server? Or the other option I investigated was scheduling a database close at 4am. This would allow for the database to be backed up from its location. And then r…

  25. Started by Echo33029,

    Has anyone found a way to trap the escape key being pressed when using a Show Custom Dialog box. The get(lastmessagechoice) function always returns 1 when escape is pressed, and get(lasterror) always returns 0. Since we need to use the default (rightmost) button to get user input into a field, it seems impossible to find out if the user simply pressed escape ( a perfectly normal behavior in the world of dialog boxes). Several online searches on this website and google has resulted in no satisfactory answer. Using Filemaker 11 Advanced on Windows XP.

  26. Started by Orchid28,

    These fields don't really need to be used in find mode because the data is so big (they are pretty large summaries). How can I create a script where I can hide certain fields in "find mode"?

    • 9 replies
    • 1.2k views
  27. hi, i am very new to Filemaker, i'd like to make a script that downloads csv from yahoo finance and i will try to creat a script to import the csv into a table in my database. I have no clue, it seems to me that a plugin is needed for this specific function, searched high and low in the forum but no luck. I prolly been searching for the wrong criteria. Please shed me some light. many thanks!

  28. G'Day FM Gurus, I am using FM Pro 11 in a Windows XP pc and trying to export several images from a database to a folder in my PC by following the documentation below: http://help.filemaker.com/app/answers/detail/a_id/5822/related/1 I tried initially running the following script Loop Set Variable [$filePath; Value: "filewin:" & Get ( DesktopPath ) & JECMCollection adam::Item ID & ".jpg"] Export Field Contents [JECMCollection::Photo; “$filePath”] Go to Record/Request/Page [Next; Exit after last] End Loop but it gives an error for each record that can not write in the disk. This is my first experience scri…

    • 39 replies
    • 5.5k views
  29. Started by jamesjames,

    Hi. Maybe someone could point me in the right direction.. I have a portal that need to be filtered by 3 different values. And since I want to be able to show all rows if the search field = "0" I cant use the related records function (i think). So I figure I should do it natively in the filter portal calculation. The problem is that I dont know how to build the IF statements correctly. I can use Tider Line::G_Month = "0" or Tider Line::G_Month = Tider Line::Cal_ Month to filter one value, but how do I proceed to include two more, and secure that if they are 0 they will be ignored? Global fields G_Month G_week G_day Cal fields …

    • 3 replies
    • 1.1k views
  30. Hello i m pretty new on FileMaker and I wanted to used FM to connect to a serial rs232 for our company weight balance,so I downloaded a troi serial plug-in as recommended. I got the trial just want to get use to it but i cannot find all the function in the External function

    • 3 replies
    • 828 views
  31. Started by john9210,

    FM 11 Adv. I don't understand when the Commit records script step should be used. Can anyone explain this?

    • 2 replies
    • 1.6k views
  32. Started by jamesjames,

    Might be dead simple but ive struggled with it a while now. I want a set field by name script to automatically select current table and then a field called "bin" I cant make Get ( ActiveFieldTableName ) to work, or set variable or any other solution... The problem is the whole select field value must be within "" and Get ( ActiveFieldTableName ) & "::bin" does not work because of this. reason? I have a bin field in most table and I want to be able to use one single script and change the current table row bin field, instead of making one for every table/layout i have. Many thanks for any tips or help.

  33. Started by aapl,

    I need a simple script to open Mac Mail, insert an email address into the 'To:' from a field, and select an option from the stationary. This way I will be able to automate sending my custom HTML stationary. Hopefully someone can help me with this. Many thanks.

  34. Started by MicheleC,

    I have a script that works fine for me but is not working (or at least, part of it is not working) for someone else on a different workstation. Any thoughts on why this might be happening? The script creates a new record and sets a bunch of field values automatically. The part that appears to not be working involves: a.) incrementing a global variable b.) concatenating that new value with some other stuff c.) putting the result into a field in the new record Everything seems to work except the incrementing. I can't figure out why it works for me but not for someone else. The database doesn't have any security or login restrictions on it. Ideas?

    • 7 replies
    • 979 views
  35. I have a relational database of manta ray sightings: Individals<Sightings<Images = each individual has many sightings and each individual sightings has many images. I have a field in the Individuals table (Mother?) that I want to Set if any of her images show she was pregnant. For each image, a checkbox field (ImageCharacteristics) has a list of characteristics (adult, juvenile, male, female, pregnant, shark bite, mating scar, parasites, etc.) that can be checked to describe attributes of the image. If any of the images for a female for any sighting, has "pregnant" checked, I want to set the Individuals:Mother? field to "Yes", otherwise set to "No". Can this …

    • 2 replies
    • 874 views
  36. HI I have looked all over the net and have found a plugin solution for this but thought that maybe the filemaker 11 may have implemented this feature. What I have table layout called "invoices" and it has a drop down list that has 3 options, Customer, trade and supplier (from a field called "type" that is in a linked table. User selects what type of client is being entered into the database, by using a drop down menu - This initial client entry is on another layout called 'new enquiry"). I want to trigger a script for each of these options once selected by the user. The point of this is that The table view i have as a layout will sort accordingly to show i…

    • 1 reply
    • 5.4k views
  37. Started by Dani R,

    hi I what to make a find script that will find all the guest that or in room "1002" . Than from the result of the find i what to chack that all the order number are the same that there will not be 2 order number . can someone help me plese

    • 1 reply
    • 1.4k views
  38. Started by WilliamG,

    Hello, I made the database back when Nashoba systems was the owner of Filemaker. It has been changed and brought along through all of the versions. I created a script that automatically launches FM at startup and opens the necessary files. Back in 8.5 I decided it wasn't necessary to keep that script in the Window for access so I edited it to either close or hide, i can't remember which. Now i want to edit the script but if I select open the script runs and does whatever I set it to do. How do I get to the point of editing a script that I can't see? I am a user not an expert by any definition so any help would be appreciated.

    • 6 replies
    • 1.6k views
  39. Started by sflynn,

    Please help. I am trying to delete a file via an automated script, and my IT guys want me to do it via applescript as opposed to buying a plugin. When we run the applescript outside of filemaker it seems to work... for instance when we run the below script in the terminal window on my mac, it works, but when we try and pass that through the applescript command in FM it doesn't do anything. here is the syntax... what are we doing wrong. ? This comes from a formula he used trying to get the same format as in the terminal window. "tell application \"Finder\"" & ¶ & "delete file " & Quote($as_command) & ¶ & "end tell" $as_co…

    • 7 replies
    • 11.1k views
  40. Hi. New here, nice to meet you all. Ive got a small problem you might be able to help with. I need to move data from one related table to another (to keep the old data if we change the original data). And I have made a script that works fine. But I would like to add a if "Protokoll register::ProtPunktID FK" exist within the related results (Protokoll::Prot ID) skip "Set field" steps. Should I use a go to find mode and perform find, or what is the smartest way? How do I then make it search on a variable like $Protokoll for example? Set Variable [ $Protokoll; Value:Protokoll::Prot ID ] Go to Related Record [ From table: “Protokoll register”; Using la…

    • 8 replies
    • 1.3k views
  41. Hello, In my current project I am using some pop-up menus that get their values from lenthy value lists (> 100). Since I am no expert neither on programming nor on FM, I was able to set up a simple "picker" based on "PopupSelectNew2.fp7" downaded from this website sometime ago and authored I think by bcooney (not sure). Since I have to use more than once the "picker· concept throughout my project, I wonder if it is feasible and worth it to modify the picker script set of the aforementioned sample so that it can be "dynamic" (not sure this is the right jargon) and usable with different tables in different parts on the same project. Finally if …

    • 14 replies
    • 3.9k views
  42. Hello: I need to validate a field that will not allow the user to enter one or more spaces trailing the entry or one that will trim the spaces on entry. Don't know exactly how to accomplish this. Thanks JW

    • 3 replies
    • 1.2k views
  43. I can't for the life of me work out how to do this. Essentially I need a lookup that returns the value of one particular field. I have a table of rates. Most of the rates are related to another table, but one particular one can't be since it shouldn't be selected. It's essentially a storage record so it can be easily changed if needed. At the moment this rate is hard-coded within the script that generates the data for invoicing. What I want to do is be able to retrieve the rate instead of having it hard-coded. Kinda like this: Lookup ( Rate ; where Code = "DSL"). That would be nice haha. Anyways to get around this? I could throw this rate with a g…

    • 17 replies
    • 1.6k views
  44. Started by natursalus,

    Hello, I have a table named Food where I list several food characteristics. Relevant Food table fields: __kpFoodID FoodName FoodCategory FoodSubCategory BloodTypeASecretor BloodTypeANonSecretor BloodTypeBSecretor BloodTypeBNonSecretor BloodTypeABSecretor BloodTypeABNonSecretor BloodTypeOSecretor BloodTypeONonSecretor So, depending on the persons BloodType and wether he/she is Secretor or Non Secretor a particular Food can be: Avoid (detrimental), Beneficial, Neutral. My final objective is to have four types of food report, one for each blood type, based on the food suitability: Avoid, …

    • 3 replies
    • 1.5k views
  45. Started by Donkick,

    I have a client database with a related table for email addresses. I also have a client field called "email_list" that is a List calculation so that shows a list of all emails related to a specific client with a return between, all within one field. The email script sends mail using the Send Mail script step to the related field "email_list" It works sometimes, but not always. I can't seem to isolate the common thread as to why it does not work all the time. The reason I did it this way was so I can send to multiple addresses for a single client. Is there a better way to accomplish this goal and just avoid this whole mess?

    • 3 replies
    • 1.2k views
  46. Hey folks, I've got a script set up which is generating a PDF of an invoice using a particular layout. It generates itself fine, and i've not specified an output file so that the user is asked where to save the file, and what to name it. This is also working brilliantly, with one exception; the generated file doesn't have '.pdf' as an extension. This isn't an issue on OSX (because OSX looks at the file to determine what to use to open it), but on Windows machines, these PDFs aren't readable because Windows still handles filetypes stupidly. I don't really want to force users to have a particular folder set up somewhere on their machine where generated PDF…

    • 7 replies
    • 5.7k views
  47. Started by john9210,

    FM 11. How can I copy an image in a container field to another container field?

  48. Hi, I have made three tables: Meetings, People, and a People-Meeting join-table. I need to create a button in the Meetings table that brings me to the People-Meeting table, create new record, and then autofill the last serial number from Meetings into the Meetings ID field of the newly created record in the People-Meeting table. I've only managed to make a script as follows: Go to Layout ["People Meetings"] New Record/Request Go to Field ["People Meetings::Meeting ID] But I don't know how to do the autofill part. Can anyone help please? Many thanks!

      • Like
    • 2 replies
    • 1.7k views
  49. Started by fmbug,

    hi everyone....please help me in a situation: how i can remove browse mode from a field through script.?

    • 8 replies
    • 1.6k views
  50. Started by Philip Jenks,

    Hello - I've got a field which has 5 lines of address in it, each line separated by a carriage return. e.g. 23 Cherry Tree Cottage Lowdown Lane Devizes Wiltshire SN3 4GH I want to run a script which consecutively: Copies Line 1 and pastes it into a separate Address 1 field Copies Line 2 and pastes it into a separate Address 2 field Copies Line 3 and pastes it into a separate Address 3 field etc. Trouble is, I don't know how to grab those individual lines in order to copy them. I have a vague idea that I should be setting up new calculation fields and use the 'Left' function, but don't know how to do it. Grateful if an FPro geniu…

    • 3 replies
    • 811 views
  51. Started by drumorgan,

    The google one is built in and works well. I run a script and I get to maps.google.com with the address of the current record. Now, I need some help getting to zillow with the same address. Fields are individual for street, city, state 1600 Amphitheatre Parkway Mountain View CA comes out like this in the URL http://www.zillow.com/homes/1600-Amphitheatre-Parkway-Mountain-View-CA_rb/ ( I actually prefer not to enter the zip as this is a good zip lookup script if needed) ***************************** The next question is a way to get the square footage data from the zillow site back into my database easier than simply g…

    • 9 replies
    • 4.1k views
  52. Started by jamesjames,

    Hi. Having some more thought and need a hint in what direction to go. I have two fields: Field1= 1000- (or similar) Field2= a letter lik A, B, or C and so forth The result should be CalcV = 1000-A, 1000-B or 1000-C I have not decided that it has to be like this, I only need to find a solution. Question: How do I get fm to check and auto-enter a letter following the alphabet? I only need 5-10 letters so it can be done manually. Basicly if 1000-A exist, next should be 1000-B and so forth. many thanks for any tips.

    • 3 replies
    • 1.1k views
  53. Started by Inky Phil,

    Hi everyone I am presetting some dates as an assumption that the user wants a report for the previous month. I intend to set a global (via script) to the 1st date of the month previous to the current date. I want to set another global to the last date of the month previous to the current date. I know this must be relatively simple but I cannot for the life of me work it out nor can I find it in the forum. Can anyone help please? Many thanks in advance Phil.

    • 4 replies
    • 1.1k views
  54. ...I would like to return to a specific OBJECT after I edit a layout. How do I use script triggers (or any script) to make sure the "TAB" / object I was working on in Layout mode..returns me right back to the object I was editing. I already have a field setting the current or last used TAB/OBJECT.....but unable to go to this object when I exit Layout mode. Anyone?

  55. Started by raiders2814,

    I've created a database for a law firm, and one of the functions that this database has is the ability to create a daily calendar. The daily calendar is responsible for displaying all of the current day's cases as well as some other information such as last name, first name, location, time, and notes about the cases. The script as is looks like this. Go to layout["Daily Calendar" (Daily Calendar)] Set Variable [$Today; Value : Get(CurrentDate)] Enter Find Mode [] Set Field [Daily Calendar::Hearing Date; $Today] Set Field [Daily Calendar::Location; Daily Calendar :: Location & "manhattan"] --only displays the cases that are located in Manhattan Perfor…

    • 11 replies
    • 1.1k views
  56. Started by ggh,

    I've got a script that runs using global fields. Once a task is completed, I want all globals to be cleared. I've got a step: Set Field [committee::g_report_begin_date;""] but the field isn't clearing. The global is defined as a date field. Is this why it won't clear - the calculation result isn't a date? Is there another way to do this?

    • 2 replies
    • 1.1k views
  57. Hello all; i love the idea of using filemaker the way Matt does. makes sense to me, however the logic is very difficult compared to what i already knew in other languages. If passing parameters using list. what r the rules or best practices for this. e.g. when user clicks on my button 1-> create a list first:: Button --> list ( "object =" & $object ; "row =" & $row;) 2-> main script:: Create a $var = (customfunction:: ( get (scriptparameter)) 3-> if the $var was created, then do other logic Also , can we get more "EXPLANATION" of the Let Function & Evaluate function as Matt uses these extensively & i…

    • 2 replies
    • 1.2k views
  58. Hello Is there a way to suppress the "save this change" alert that appears when changing the view using the standard menus and being logged-in with a privilege set that allows layout modification? I realise that I can do it with custom menus (by trapping the View As commands) and by restricting privileges, but I'd like to do it for standard menus and all users with layout edit privileges. Thanks Vaughan

  59. I have a script that includes the Send Mail script step using SMTP, performs without dialog and runs with full acces privileges. It works great in FMP, and although it should be web compatible in this configuration, it doesn't run when I initiate the script from a web page using the PHP API. If I disable this step in the script, the rest of the script runs without any issues. My goal is to send an email notifying someone that a specific action has been made. This action occurs in the script that is being run. Any ideas what might be wrong? Any suggestions for other methods of sending the email? I am using FMStudio with the FileMaker PHP API along with FMP 11 a…

    • 4 replies
    • 2.1k views
  60. Hi... please help if you can. I am running a script that has an insert file command so the user can select a flie. I would like to have the system automatically select a path well down the file tree to keep the user from having to tunnel through 5 layers of folders.... I can get it to select a file... but can I get the window to open at a folder level allowing the user to select files or folders within that ... filemac:/rootfolder/sub_folder1/Sub_folder2/THIS IS WHERE USERS WILL SELECT FILES I want FM to open up the insert file window already open to "Sub_folder2". Thanks for any help... I'm stuck.

    • 4 replies
    • 1.3k views
  61. I have a picture database of almost 10000 pictures. It is located on a Raid Drive on my Mac a few folders deep. Within that folder, I have other folders that have the the jpg files of these 10000. My Database uses a container file and stores a reference to these jpgs. The problem I have is if I move the database file to some other folder or drive that is not the same name as I started, the references to all those pictures (or the container field) will be blank (cannot find imagexxxx.jpg) will be posted in the container field. Is there anyway I can write a script that will relink those references to a new folder or folder(s)? There has got to be a way to see…

  62. Started by carguy195792,

    Get ready for a headache! I have this wonderful Finance database that I have been working on (With your guys' help) for quite some time. In this window (Table View) it shows all transactions for a given account. The issue is that the program also manages "recurring transactions" which it automatically creates records for at the beginning of the month. Each record has an "ID" that is a sequential serial added at birth. Problem is, (see picture), when the recurring transaction gets created, it's ID will be lower than another transaction that might occur on the same date, even though the recurring transaction cleared the account AFTER the newer transa…

    • 5 replies
    • 1.8k views
  63. Started by muzz,

    I'm hoping someone can help me with an intermittent problem I'm having running an external script from an opener file in FMP 6 on Mac OSX (10.4 on the remote, 10.5 on the host). The opener is on a machine on the same LAN as the host also running FMP 6 (only 2 machines). The opener has a "Perform Script" step which runs an opening script on the host file (hosted by FMP 6 only - not server). In the opening script are some steps to capture errors such as if the host file isn't already opened or it can't connect etc - these usually work well. However on occasions it seems that users may be presented with the "Open Remote" dialog window when things don't go as planned…

    • 2 replies
    • 784 views
  64. Hi All~ My latest dilemma involves writing a script that will find all the records that were created by a specific user. Basically it breaks down like this: User logs into the database. User wants to know what POs (records in this case) they've made and are still active (Y/N radio button). User runs script that pulls in all records that match these criteria. I can do all that. Easy with one user and one user ID. My issue is that in the script, how do I make a find step that will read the current user? many thanks! I've attached a file with the script I'm trying to make work. This is just a work file. NOT PRETTY! POs test…

    • 8 replies
    • 2.5k views
  65. I need to have a service form be able to enter in new client info into the contacts table that will be placed into the project table as well. would I need a script that would create new records in both contacts and projects to perform this?

    • 6 replies
    • 2.1k views
  66. Started by calton,

    I have a list. I would like to send out an email when today's date equals to the EmailDate column in the list. How to schedule the task to check time everyday. Thanks.

  67. I've actually been struggling with this for a couple days and can't seem to pinpoint the logic: I have a set of records. There is a related portal on the layout. I go to the first record via Go To Record/Request/Page First. Start a loop. If a certain field is empty, Custom Dialog 1 (shows the user the record ID number and a message specifying the problem). Then... If the count of the number of records in the portal is <2, Custom Dialog 2 (shows the user the record ID number and a message specifying the problem). Then... Go to the LAST record in the portal. If the date equals the current date, Custom Dialog 3 (shows the user the r…

  68. Started by buckbuck,

    I have a script to create an Invoice pdf, and attach it to an email. MY database has a field Status Payment that tracks my Invoicing. Ordinarily after I send this email I would go to Status Payment and select from a value List "Invoiced" so I know who is invoiced and who is not. Can I automate this with a script? How? Thanks

  69. Hi guys~ so I'm trying to learn some basic scripting and it all seems like gibberish to me. Does anyone know of a quick primer lesson that I could take that would teach just the basics. I'm not a programmer by trade but am fairly tech savvy. any help would be GREATLY appreciated! y'all rock! Stewart

    • 3 replies
    • 4k views
  70. Started by GizmoGCHC,

    Hi, I am rather new to this stuff so please excuse my NOOB question. I have a large filemaker database that has grown over the past 10 years. There are around 85 database files with a main menu that links to 15 or so different database files. The problem I am having is I have made a new layout on the Main Menu, a file dedicated to nothing else except to link to some of the other DB files we have. This new layout is a reports layout that will pull up the reports layouts from other database files via buttons. The way I have gotten this to work is to write a simple script in the main menu DB file and a script in the DB file I want to pull up the…

    • 2 replies
    • 800 views
  71. Hi, OSX, FMPA 11.03. I'm working with UPC barcodes and scanners. I scan the code to a global number field then use 'Set Field' to get it into the correct UPC number field. Problem is the UPCs have 3 leading zeros. The leading zeros show correctly in the global, are dropped by 'set field'. Can i make 'Set field' to keep the zeros without adding them as a calc (which seems redundant). Thanks, ft. EDIT... Sorry to answer my own topic... Using 'Set field' with getastext(barcode) works. Thanks, ft

    • 1 reply
    • 945 views
  72. hi all, i'm viewing a bunch of child records in subsummary mode (nice this can finally be done in browse mode, btw). i'd like to change a field in all records under a subsummary to something else (in my case a flag check box, but i guess that doesn't matter). but how do i trigger a 'replace' function without affecting all other records at the same time? i can't go by recordID either, because there are other child records with the same ID that don't belong in the current subsummary. i may be able to hack some sort of looping contraption, but that seems really clunky. thanks, stefan

    • 2 replies
    • 666 views
  73. Hey guys and gals.. I made some script trigger in FM 10 advance.. then tested it, but it doesnt work in FM pro 9..Is there a way i can make the script trigger function in fm pro 9?Thanks!

    • 2 replies
    • 1k views
  74. Hey Everyone, What i am trying to do is pre-fill a new record with a bunch of fields from a previous record. I'm going about this by setting variable's and then "set field" to fill in the designated fields in the new record. The problem i am having is that i need to do this with a field in a portal and using the above method will only fill in the first row of the new portal. I'm looking for a way to grab multiple rows of the portal instead of just the first one to pre-fill the new record. I'm sure this is easy for you filemaker experts and any help is appreciated!

    • 15 replies
    • 2.4k views
  75. I want to make a drop down list to "find" data rather than "input data". So when I click on the drop down list and select a topic, it will search for that topic and all the data that has that topic will come up. The reason why I am doing this because my boss will not remember all the data she needs to find so if there are over 100 people in 20 different cities she wont remember all the 20 cities we have to look for. So it would be easier to have a list of those 20 cities on the drop down list and she can just click on one of them like Los Angeles and people living in Los Angeles will come up. So how can I create a Find/Search drop down list?

  76. Here's my situation, i have a bunch of order records with line items. For a given found set of orders, I do a "Get Related Records" and get a found set of all the line items across several orders. Let's say one order has 20 units of product A for a total of 20$ and another order has 10 units of Product A at $25.00 (pricing for products differs throughout the year) How do I loop through this data and generate at the end a set of consolidated line items for all the orders, so that my new consolidated order (the idea of the script is to take many small orders and generate one big order out of them) would have 30 units of product A at a price of $45.00 ? An…

    • 3 replies
    • 801 views
  77. FM8.5 I have a script that allows me to create a pdf of a record and attach it to an email, as follows: Go to layout [invoices] Print setup Show Custom dialog ["Invoice PDF Option" ; Create PDF of this message (Current) or all Messages (Being Browsed)"] If [Get (LastMessageChoice ) = 1] Save Records as PDF [Restore; No dialog; Current record] Else If [Get (LastMessageChoice ) = 2] ..... Else If End If Send Mail [send via E-Mail Client: Contact::Email: Subject :Invoice Exit Script Enter Browse Mode See attachment for a detailed jpeg. I want to be able to loop this script to enable me to send an email to a found set. In this case th…

    • 2 replies
    • 874 views
  78. I have a portal from which I am able to go to a portal row and copy conetent from two fields in the portal to fileds outside the portal using a go to portal row script without problems but in the same row, I have two additional fields that are lookups into another table that I also need to copy into outside fields as well. What happens when I invoke the script is the first two fields in the selected portal row works without issue but the two lookups field copies always comes from the first row of the portal and not the second. The portal itself works exactly as it should but for the life of me, I can't get the lookup files to work as they should. Any help on this would be…

    • 7 replies
    • 3.2k views
  79. How can a portal field trigger a script through IWP? I found that clicking on a field in a portal row doesn't trigger the enter event. I named the field and put a button on it with a script that did Go to object. That triggered my first script locally, but that still fails over the Web interface.

    • 0 replies
    • 833 views
  80. Is there a way to have the starting value of the Replace field value - serial numbers be a variable that was declared via a custom dialogue box. I have a list of cheques that I need serialized. Between these sets say 50 cheques, other checks are used. Ie. Set 1 runs off at 1-50, 51, 52, 53 are given to three individual parties, then the next set is printed from 54-80. etc. So i thought I would create the cheques then renumber them quickly via Replace with serials. Here is what I have: Go to Layout [ “Org. Cheque Listing” (SELECTDATES 2) ] If [ Get ( FoundCount ) = 0 ] New Record/Request End If Show Custom Dialog [ Title: "Check Number Input"; …

  81. Started by Hutch69,

    Just got up from the sword I fell on. New at FM. Writing a DB to barcode scan issued firearms and equipment for a duty shift - both in and out. Have a History table that records various things including the person issued to, time in and out and the equipment ID. Also have an equipment table that records items, serial numbers etc. The equipment table has a flag to record whether the item is in or out. My sign out script sets the flag to '1' by simply set field [Equipment::is_out; 1] I can't seem to manage to reset the flag to 0 upon equipment return. I need the flag to be in the equipment table as I use it to provide a count of items in and o…

    • 6 replies
    • 1.4k views
  82. Anyone know a solid, easy way to "select" portal rows with a check box? Then run a deletion script to delete the selected portal rows? Giving User an easy way to delete selected portal records is just one of the task I would use with this technique for. In future, the possibilities are endless, move records, mark as "complete", print, etc... I could... set up a relationship that holds only "selected" records, access it via script and loop through records and perform task. Anyone think of a way to do this in a better way? Maybe no additional relationship? Or some tricks to use in the script to make this run smoothly? THANK YOU FOR YOUR HELP! …

    • 3 replies
    • 875 views
  83. Hi everybody i've trying to apply a script trigger to a calculation field that should start when the value of the calculation is not equal to another field. I think that i'm wrong but nothing happens with the script when the condition is true. Thank you in advance for any suggestion. Maybe the script trigger is not applicable to the calculation field?

    • 8 replies
    • 7k views
  84. Started by Bmiller4evr,

    I have a series of map co-ordinates, they coordinates are always 3 numbers followed by a letter. the first 3 numbers represent a page number of a map, and the letter represents an area on that page. I don't know if any of you are familiar with a mapsco, they are very popular in Texas, but that is where the coordinates have come from. Sample data would be as follows: 063B ... page 63 letter B 121A ... page 121 letter A 009R ... ect. 102P I need to assign postal codes to these boxes. the only way to accomplish this task was to lay out a table where the page numbers run vertically and the letters run horizontally. if i were using excel i would use an index …

      • Like
    • 8 replies
    • 1.6k views
  85. I have a list of real property addresses that comes to me from the county. unfortunately the county has an odd way of keeping its records. here is a sample of what a few of them might look like: 001234 Main St 000010 Elm St 098701 Oak St I need a script that I can run manually or trigger upon import that will separate the address into two fields, the street number without those annoying leading zeros and street name, as well as a field that has the street number and name together, again with no leading zeros. So visualize the results I need, I need the following 3 fields of results produced: Street #, Street Name, Address 1234, Main St, 1234 Ma…

    • 6 replies
    • 1.5k views
  86. I'm stuck in completing my database and am in need of some instructional guidance. I have a value list field,"Status Code" that contains two values: "AP" and "NAP". Upon record creation "NAP" is auto-entered. (This part I have working properly.) I set up permissions to restrict access only to the "Status Code" field. There are two privilege sets; one for "User" and one for "Admin". The "Status Code" can be changed to "AP" by an "Admin" only, but still allows a "User" to create new records and have access to the field via find, sort, print, etc. (As far as I can tell, this part is also working fine.) What I need help in understanding how to accomplish is…

    • 16 replies
    • 1.5k views
  87. Hi I have a script that can take several seconds to run and it's difficult to know up front how long it might take. Obviously getting the script to work faster would be best and I am working on that, but in the mean time I want to pop up an alert to let the user know that FileMaker hasn't just hung or something. So in the middle of a loop I can use Show Custom Dialog if the elapsed time is greater than a certain amount. The problem is that the script stops execution until the dialog box is dismissed. Is there a way to pop up a non-modal dialog box while allowing the script to continue? It would be even better if the dialog box could be dismissed automatica…

    • 4 replies
    • 3.1k views
  88. I have a list of real property addresses that comes to me from the county. unfortunately the county has an odd way of keeping its records. here is a sample of what a few of them might look like: 001234 Main St 000010 Elm St 098701 Oak St I need a script that I can run manually or trigger upon import that will separate the address into two fields, the street number without those annoying leading zeros and street name, as well as a field that has the street number and name together, again with no leading zeros. So visualize the results I need, I need the following 3 fields of results produced: Street #, Street Name, Address 1234, Main St, 1234 Ma…

    • 1 reply
    • 908 views
  89. I have Radio Buttons that I would like to disable or audit if a particular event has happened. If the fields were Checkbox Sets or a regular Edit Box, I could set a Script Trigger to run a Script OnObjectEnter. But it seems that if I attach a Script Trigger to a field with a Radio Button Set, and the user clicks directly on one of the options, the data changes to their new selection, and then the script runs -- so I can't capture what the original data was. How might I disable or audit fields with Radio Button Sets -- based on an if particular event has happened?

  90. Hello everyone! Is there anyone here who knows how to send automatic email reminders with FM? I have a client database and I want to be able to pre-write a message that will be automatically be sent to some specific clients on a specific date. Can FM actually do this? Are there any plug ins that would do that? I tried downloading the free version of mailit, scriptfire and I don't know how to use them... or even load them for that matter.. There's a java JRE problem that seems to be happening and I have NO CLUE whatsoever as to how to deal with this... I need help!! And if it's too complicated to explain, I would be willing to pay someone to help me th…

    • 4 replies
    • 1.4k views
  91. I am trying to have a database with photos in a container field and in the form have the related photo be inserted if check box is noted to allow. Hope this is explained right. Any help would be appreciated! Thanks!

  92. Started by fed,

    Is there a way to clear global variables?

    • 3 replies
    • 1.4k views
  93. Started by jkgator99,

    I am new to FileMaker but am learning as I go. I have what seems to be a simple request. Is there a way that you can pass a value (not in a field) to the user's clipboard? I have a button that when clicked should pass "#pam" to the user's clipboard. This is not in field though. There is a second program that is watching the clipboard that will perform an action when this shows in the clipboard.

    • 4 replies
    • 1.4k views
  94. Started by Spidey,

    Hi, Is there a script or function to change data format from text to number(vice versa) when click a text box. Many Thanks. K.C.

    • 1 reply
    • 762 views
  95. Hi guys, I am creating a fairly basic Maintenance Database at my work. The database has 2 layouts, one where you record issues as you see them, and the other is a DataLog table that has all the issues that have been recorded. One of the fields in the DataLog table is "Resolved" and I have it set as a radio "Yes/No" button. What I want to have happen is when a user clicks "Yes" an automated email pops up with a set list of email addresses (I know how to do that part) and within the body of the email all the information for that current record, or as an attached PDF, either way. There are 6-7 fields for each record. For sake of ease let's call them Field1 - F…

    • 1 reply
    • 915 views
  96. Started by ddinisco,

    I have a group of records in which some have data in the 'time' field and some do not. I would like to sort the records in order of time, with all on the empty time field records at the bottom of the list. I am guessing this can be accomplished with custom sort? Thanks David

    • 23 replies
    • 2.2k views
  97. Started by skearton,

    Hi Gurus! I spent today figuring how to get a picker window locked down. It is our product picker window, and now the user must select a button on it to do something or they can't close the window. Fine and dandy with selecting a product because we have already specified the find request for the customer products. Now, I'm trying to implement the same thing in the quote contact picker. Before, the user could only select one contact at a time to add to the project contacts table. I wanted to give them the ability to add multiple contacts at a time. The rub with this is we rely on the user to do a find for the contact or customer name first to narrow down the res…

    • 1 reply
    • 1.6k views
  98. Started by billy_trimble,

    Hello everyone, it is the novice that has learned a tremendous amount on this forum already and I can't wait to learn more. I have what is probably a fairly simple question and I have looked through a fair amount of samples but can't seem to find what I am looking for. Here is what I am looking to do, and a portion of it may not be quite as simple... 1a. I have an Image1 container field with a button below it to insert picture. I would like to write a script for that button that would allow me to seek out the file from Finder in Mac OSX, which I would obviously navigate to iPhoto or a specific folder to "import" the picture into FMP. I need this to also carr…

  99. I am fairly new to Filemaker Pro but tend to learn very quickly. I have purchased the Missing Manual book for Filemaker but still haven't found what I am really looking to do. Forgive me for my lack of Filemaker terminology at this point (it will improve), so I will type out what I am looking to do and hopefully someone will have a solution. Using a button on the record page I would like to do the following: 1. Save the current record as a PDF file. 2. Name the said PDF file using the Order Number field result which would be a sequential order number, to a temporary folder or desktop folder. 3. Attach saved PDF file to email. 4. Email PDF file to sam…

  100. I want to do something that I had thought was fairly simple, but I can't get what seems like the obvious Filemaker tool to work for me. I need to be able to tell whether a number field in a settings table changed from 0 to 1 or 1 to 0 and to call a script that performs an action if and only if the field changed. The script's action depends on the direction of the change. Setting the OnScriptModify trigger to invoke a script would seem to be the obvious thing to do, but apparently if you change a zero to a zero or a one to a one, the script will be invoked even though the field didn't actually change. So I set another script to record in a global field, NumberOld, the acti…

    • 10 replies
    • 3.7k views

Recently Browsing 0

  • No registered users viewing this page.

Who's Online (See full list)

  • There are no registered users currently online

Important Information

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

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.