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. Started by Dani Rubenstein,

    hello to all. i want to use get url to get json data from a php file. when i run a script i get 3 rows in json. {"id":"2","userID":"1","app":"1","from_name":"danirub","from_email":"[email protected]","reply_to":"[email protected]","title":"test","plain_text":"","html_text":null,"sent":"1391675943","to_send":"5","to_send_lists":"3","recipients":"5","timeout_check":null,"opens":null,"wysiwyg":"0","send_date":null,"lists":null,"timezone":null,"errors":null,"bounce_setup":"0","complaint_setup":"0"},{"id":"3","userID":"1","app":"1","from_name":"danirub","from_email":"[email protected]","reply_to":"[email protected]","title":"bbbb","plain_text":"","html_text":" how can i split…

  2. Hi folks, I'm trying to replicate (in a List view layout), a portal filter set up successfully on another layout, using a selection from a drop-down list to cause a list of invoices to be filtered by balance amount (=0.00, >0.00, <0.00, or 'Not Invoiced'). The portal filter calculation is as follows: Client::InvoiceFilter = "Show All" or Client::InvoiceFilter = "Show Paid" and Invoice::Amount Due = 0 and not IsEmpty (Invoice::_pk_InvoiceID) or Client::InvoiceFilter = "Show Unpaid" and Invoice::Amount Due < 0 and not IsEmpty (Invoice::_pk_InvoiceID) or Client::InvoiceFilter = "Show In Credit" and Invoice::Amount Due > 0 and not IsEmpty (Invoice::_pk_I…

      • Like
    • 11 replies
    • 4.6k views
  3. Jeeeez guys, when I started meddling with FM, I had no Idea of the vast possibilities it has... Now, I want more and more every day. Now this is one problem I can't seem to solve so thought you might have some ideas how to do this. This is the situation: FM 11 on OSX 10.6.8. Created a database of invoices for my non profit. As it happens, a lot of people are overdue on their issued invoices. So I got the idea to create an automated script that will when I activate it create a PDF report containing invoices overdue for every person. And then compile a personalized email that attaches the PDF for that person and then sends it to them. Simple, ha? Well, I know how …

    • 3 replies
    • 1.9k views
  4. I was wondering how I would retrieve variables that I set in another script. I decided to split all my scripts up and one of them was to set all the field values as variables, so that when I created a new record and only needed some of information in those fields, I could set them individually by retrieving them from that script alone. Kind regards

  5. Can someone help clarify for me the different behavior on two different references to a field's value? Looking at these 3 script triggers (and when they fire relative to the event): OnObjectModify After OnObjectValidate Before OnObjectSave After Test case: * Create an edit box layout object, pointing at a text field in a table (TableA::Field1). * Create a script that reads the value of the field in two different ways: Set Variable [ $inside ; value = TableA::Field1 ] Set Variable [ $param ; value = get(ScriptParameter) ] * Compare (in your preferred way) the two variables to see if they are the same. …

    • 8 replies
    • 1.4k views
  6. Started by Ascarine,

    Hey all, I've been looking around the internet trying to find the answer to this but can't seem to find someone that's having the same problem I am. What I'm looking to do is remove every character to the right of a specific point in a string. The string has Markup tags and I want to remove everything after the last one. Here's an example, the string I pull down has a long value and at the end has the following: "</stringName> Æö± µþ" The ending is seemingly random UTF-8 transmission which I want to cut, and as it's random it doesn't have a fixed length of characters and therefore I can't use a LeftString - X Right characters, and as they're not w…

  7. Started by Dan Pouliot,

    (FMPA 12.0v5) I have a script with 1 script step: "export records". "run script with full access privileges" is checked for the script. When I run the script under a full access privilege set, it works (it displays an export dialog, then exports the file). When I run the script under a privilege set where "allow exporting" is unchecked, it fails (it does not display an export dialog, and does not export any file). This doesn't sound correct. Anyone know what I'm doing wrong?

  8. Started by fed,

    I was wondering if there was a way to put the clipboard contents into a variable without putting it into a field first. Thanks, Fed

      • Like
    • 14 replies
    • 3.3k views
  9. Started by Harry,

    Hello Board! Can i get some guidance, point me in the right direction? I have some labels printing out filled with text fields and a Calc field. It works OK. What I'd like to do is resize the Text fields dependant on their content. So, for instance, we have a Product::Colour field. Sometimes the content is 'Black'. Sometimes it's 'Black with Grey and a few spots of Maroon' (for instance). I'd like that field to fill the entire width of a label, whether the content is small or large. Is there a way to do that via scripting? Can i also, if that's possible, allow the text to wrap onto another line, perhaps? Or adjust the position of other Text fields if it …

      • Like
    • 9 replies
    • 1.4k views
  10. I am doing an order entry system. I have an "Order items" table that relates to a "Products" table via a "ProductNum" field. I am using a portal to display the product info when the "ProductNum" field is keyed in. It works fine as long as the ProductNum exists in the Product table. Otherwise, I get no product info. I set an onObjectValidate trigger on the "ProductNum" field to run a script that would validate the ProductNum. The script does a count(Products::ProductNum) but it always returns 0 even if the Product Number is valid. For testing, I changed the trigger to onObjectExit and it works, but that trigger causes other problems; namely, it fires wh…

      • Like
    • 20 replies
    • 3.5k views
  11. I have the attached script which allows the user to find a group of records, grabs the user's Desktop path -- Get(DesktopPath) and sets a field to be used as a variable --- Get(DesktopPath) & "exportPoints.tab", uses that field to set the variable $filepath which is used in the export. Â On my machine and on a few other machines (all using Windows 7) this works fine and dandy. Â On the person's machine that is supposed to use this, I am told that the error message - can't create file - either locked, or no room on disk or whatever occurs and no file is created. I have found that this message comes up very often when the $filepath is set incorrectly - but that do…

    • 2 replies
    • 1k views
  12. Hello, Solution background: company has 3 specific invoices types that are used very frequently in the course of their business (equipment inspection/repair service). When the user invokes a new invoice, based on the invoice type chosen, I'd like the invoice line items to auto-populate with data that are always associated with this particular type of invoice i.e. part xxx is always used, labor associated with installing part xxx is always the same etc. The only variance is the quantity of parts used and in turn, the time to install said parts. *note- the invoice is not just limited to the auto-entered parts/labor... add'l relevant line items can be added. Creati…

      • Like
    • 5 replies
    • 1.9k views
  13. Started by haani,

    Hi Guys, I have created a simple audit log script, just wanted to know how to add parameters to allow capture of field name, old value and new value? script is below. Show Custom Dialog [ Message: "Reason for this change/new record?"; Default Button: “OK”, Commit: “Yes”; Input #1: Clients::gChangeNote, "Change Log" ] Freeze Window Set Variable [ $ID; Value:Clients::ID ] Go to Layout [ “Audit Log” (Audit Log) ] New Record/Request Set Field [ Audit Log::ID; $ID ] Set Field [ Audit Log::ChangeLog; Clients::gChangeNote ] Set Field [ Clients::gChangeNote; "" ] Go to Layout [ original layout ]

  14. Started by haani,

    Hi, I have a field called Invoice send date, and I would like a reminder to popup within 30 days of that invoice send date field, this is what I have so far in the script and is not working as it takes current date into account. Go to Layout [ “Invoice” (Invoice) ] Enter Find Mode [ ] Set Field [ Invoice::Invoice send date; Get ( CurrentDate ) & "..." & Get ( CurrentDate ) + 30 ] Set Error Capture [ On ] Perform Find [ ] If [ Get ( FoundCount ) > 0 ] Show Custom Dialog ["Invoice Reminder"; "Invoice is overdue, please check if it has been paid"] Else Show All Records Install OnTimer Script [ ] End If Install OnTimer Script [ ] any help would be much…

    • 19 replies
    • 2.2k views
  15. Hello..  I have 2 questions  1) I am trying to COPY AS both my Program fmp12 (4 time larger than data) and my Data.fmp12 to Backup folder..  My code is attached image My results is 2 files.. but both are the same size... meaning I am copying the Program twice I thought the Open Data cmd did the trick.. but then viewing Get( filename) say I am not   2) once the files are copied... is it safe to email the fmp12 files,  (probably be 2 emails)  what might be recommended getting 2 files remote.. we're updating a 2nd workstation.. for graveyard shift.. running a run-time duplicate of same app  TIAÂ

    • 5 replies
    • 801 views
  16. One would think this is easy but I have not found answers. I have a script which does some work and then when done, I want it to pass a value from 'Status' to a sub script which wants it for its script parameter. I know at least I think it would be Exit Script but if I exit script then how can I run the sub script after it? And if I put it before then it does not run the sub script. Please where does this go and how? This sub script sometimes gets its script parameter from button presses but sometimes it can get it from scripts like this one. Thank you.

      • Like
    • 16 replies
    • 1.6k views
  17. Hello The field I have is empty and I drag some text from another app into a filemaker empty field. When I see the field populated by the text I just dragged in I would like another script executed. How do I do this? Thanks

    • 2 replies
    • 904 views
  18. On a local machine I have been using the following expression as part of a script to set an image reference to a container field: If (inv_INVOICE_LINES::pose<>" ";"imagewin:/W:/" &INV_INVOICES::id_Session&"/Previews/" & Trim(inv_INVOICE_LINES::pose) & ".jpg";"") Now I have moved the Fm12 file to a server and have moved all the images to the root drive of the server in a folder named "images". In other words the images are now in c:images ... on the server. All the sub folders previously on the "W" drive have been moved as well. I can't seem to get the imagewin expression to find the new location.

  19. Hi guys, I been working on this possibly easy task for several days now and really I'm past my Google up Filemaker skills. I have developed time-sheet which is using job codes do differ between jobs and boss wants me to add feature which would count total time for those separate jobs. Sometimes there might be few records with same job "number" and other time is just one. I have exported all jobs into one record with times and codes but now need to add same record names into one record with total time. Example ab 2, ab 3 into ab 5. Job names are random, generated by boss. I have attached simple file set up as the part I'm working on.  Any geeks out there ?? Plea…

    • 2 replies
    • 1.1k views
  20. Started by Koen,

    Hi, Is it possible to tell FM to execute a script very day at 3 PM? Or a workaround to make that happen? Cheers Koen

    • 14 replies
    • 4.3k views
  21. I use a main menu layout to navigate through the various tables and layouts with buttons. I'm trying to write a script that will ask if a window with a certain name is open, then go to it, or if not then run a script I have to open a new window and go to a particular layout. Trying to prevent having multiple windows open with the same table/layout. Any suggestions. Thanks.

      • Like
    • 2 replies
    • 1.8k views
  22. Started by Dani Rubenstein,

    hi to all i have a filed that name tagA. in the filed i have tag numbers that are stored "010203040506". how can i separate then bt script that that will stored in filed tagB :"01,02,03".. ​the length of the string can be longer to shooter thanks Dani

      • Like
    • 18 replies
    • 1.6k views
  23. Started by no23rman,

    on FMA11, How do you run script when user keystroke "enter"? I have a text field that ONLY when user keystroke an "enter" the script will run. nothing else matter. i tried 1. OnObjectModify = script runs right after first letter typed/modified = not good 2. OnObjectValidate = script run even without "enter" keystroke = not good 3. OnObjectEnter = script run right after field activate/ no "enter" keystroke necessary = not good 4. OnObjectKeystroke = script run with any keystroke not just "enter" keystroke = not good 5. OnObjectSave = i dont know what this for = definitely not good 6. OnObjectExit = script run when exiting field not by 'enter" keystro…

    • 11 replies
    • 11.9k views
  24. Started by rkass068,

    Hello, I am just wondering if there is a method to apply a script to all layouts in a database solution. I have many layouts in my solution and I would like to know if it is possible to apply an on timer script to every layout as opposed to going into the settings and setting a script trigger manually to each and every layout. Thanks

      • Like
    • 4 replies
    • 1k views
  25. Hi Everybody, I am here again with other "rookie" problem. I have a FM database with several thousand records ( in the attached example there are around 6100 records). Basically, I have in each record a field "sequence" with a sequence of letters (aminoacids). I would like to find the unique sequences (no repeats), it means, the unique records. But it is not so easy because there may be sequences which are a fragment of others. Therefore, I have created two scripts: the first one "unique partial" checks that each FULL sequence is unique and then writes in a field ("unique_partial") "1" or "0" depending on whether the sequence appears only once or more respec…

    • 4 replies
    • 1.6k views
  26. Hi, Â Simple question (I think) - what makes a field "Active"? Â I am trying to write a script that goes through the fields for a table record, and then using Get(ActiveFieldName), pull the name of the field and put it in another table (among other things). Â The problem I have is no matter what I have tried, the "Active" field is always the same! I have tried using Go to Field, I also am using Go to Next field - but at the end of the script, it has pulled the name from the same field over and over. Â I wonder if the only way to actually make a field active is to actually be clicked on that field? Is there another way to access a field and get its information …

      • Like
    • 11 replies
    • 1.5k views
  27. Started by ddinisco,

    Having a strange problem. This applescript step is only working on SOME computers in our office and not all. The error we get is the path can not be found. On the computers where it does not work, if I enter the full path instead of using 'set x to cell' it DOES work...so the path does exist. So far I have ruled out different versions of FM, FM user/permissions issue, different operating systems or connection type to server. I have done this many scripts and can not figure out why this one is not working. Any help would be much appreciated. set x to cell "mediaprojects_path" of current record set y to cell "deliveryPackageName" of current record do shell script "m…

    • 5 replies
    • 1.4k views
  28. Started by madman411,

    Hi All, Recently found out that some of the users of my system have accidentally created duplicate records which I've had to go through manually and delete. Seems sometimes the network connection is slower, so they click the button more than once while the system is still responding to the original request, thus creating two related records with the same date, separated by mere seconds in the creation time field. I would like my related record creation script to detect if related records already exist if the creation date matches the current date. Probably best to prompt the user a record was just created and request approval to create another one. Or perhaps, is it p…

    • 1 reply
    • 804 views
  29. Started by qube99,

    I have an if() that contains a list of conditions separated by logical AND. Can I revise that list of if() conditions on the fly? When another part of my program detects something I'd like to add another condition to my if() so that it's there when the program loops back through. I just can't think of a way to do that.

      • Like
    • 7 replies
    • 1.6k views
  30. Just tidying up some button scripts and this one has got me stumped! Scenario (iPad based); User taps 'Create New Invoice" button Custom dialogue asks to confirm, with Yes/No option If "No", then script halts, Else continues to Invoice layout and proceeds with New Record/Request steps etc. Just not sure how to get the script to halt if the user selects No in the custom dialogue box. Perhaps going about it the wrong way?

  31. OK, so I've run into a challenge with some scripting. Would appreciate some help here. The context is as follows: I have a layout set up for recording animal consult notes. At the bottom of the layout, are 2 buttons relevant to this issue. First is "Create New Invoice" & second is "View Existing Invoice" (Visit Notes table and Invoice table are related via primary keys). The first button works fine - generates a new invoice as intended. HOWEVER - I only want the "View Existing Invoice" button to bring up an invoice related to this animal - only if it has been created yet. The Problem - At the moment however, if a new visit note has been made, b…

    • 7 replies
    • 1.3k views
  32. Started by John Chamberlain,

    Maybe my memory is faulty, but I used to be able to copy a script and then paste it into another application (like Word if I wanted to do a bunch of Find/Replace changes - or to paste a script into an inquiry on this Forum). Now I find that I can copy OK, but I can't paste into anything except FMP. Have I got a bug in my application? Should I re-install the FMP program? Thanks,

      • Like
    • 11 replies
    • 1.5k views
  33. Started by daniel,

    Hello,  I'm having some difficulties with a search scriptâ�¦ I have one (tabbed) layout where I have a button which runs a search script. This search script opens up a new window / layout in which the search should take place and subsequently return the value I'm searching for. What I'm searching for in particular is a serial number of an asset and I'm trying to save this down as a global variable ($$gSerialNumber).  This is the script I'm trying to run:  However, the value being returned (again, $$gSerialNumber) seems to be random at best and often comes back empty. This is in spite of me having a drop down list in the new window being opened so I should al…

    • 1 reply
    • 725 views
  34. For a reason I cannot explain the second print does not use the layout specified in the second goto related record. I do have one print for customer and another one for merchant. Both are different. However when executing the script I get two copies of the customer layout. I do not understand why. Is there something that I am missing ? Thanks! Daniel TSP100_InvoicePrinting.pdf

    • 2 replies
    • 783 views
  35. Started by James Patrick,

    Hello, I have been searching for answers to this problem but haven't had much luck. I have 2 layouts based on the same table. I have a field called department on each layout that has a dropdown with the values A, E, P, C. What I am trying to do is create a script, that triggers onlayoutenter in the layout setup, that shows only records with the value A and E on layout 1 and only values P and C on layout 2. My script I was using was perform find based on the field dept = A, omit records with dept = P. This seems to work but I can't get it to work with multiple values. Any help is greatly appreciated. Thanks James

  36. Started by GregInChrist,

    I have seen some videos around that show FMP having the ability to drag and drop items in a list or probably rather a portal. I have heard it can be done without any extra table occurrence and with just a single script. However I can't find the scripts anywhere. Is this just someone trying to get me to buy into a subscription?!?!?! Here is one video I found, the video just says I need to buy a subscription under the video is a link to the sample video not full instructions. Is this legit? Do I need to buy the video or is there a tutorial someone can point me to? http://www.filemakermagazine.com/videos/portal-row-reordering-using-drag-drop Thanks!

      • Like
    • 3 replies
    • 2.4k views
  37. Hello everyone again... and let me just start off by saying how HELPFUL this forum is!!! I have a form which has a OnLayoutEnter script which does as follows: Enters Find mode Show Custom Dialog box Performs find Is there a way I can loop the custom dialog box until the user actually enters a search or if the search didn't find any records matching the query? I ask this because I have some users who are extremely computer illiterate and some times the cursor is no longer in the textbox and they don't realize and they hit enter and of course it gives them the common error message.

  38. in filemaker, i have a purchase order table that has a portal with items listed. i want to update the inventory table with the number of items on order for each item in the portal. i tried using a loop that ends with Go to Portal Row [select;Next;Exit after last], but the loop continually updates the quantities for each of the items in the portal, rather than updating one and moving to the next. what step am i missing? Thanks!

      • Like
    • 4 replies
    • 8.3k views
  39. I think I found a bug in Filemaker 13. The script step "New Window creates an error message that I have attached. This error is occurring in previously developed Filemaker 12 scripts and in new ones. The window does open but this error message always appears.

    • 2 replies
    • 1.7k views
  40. Using FM Pro 13, I am trying to create a script to append several layouts onto the front of an existing external PDF. I can append them to the back of that external PDF easily, but that won't work for my use. It appears I need to create my new PDF (called PDF 1), and then append the existing external one to that one (PDF 2) creating a final PDF3. What I can't figure out how to do is grab the external one (PDF 2), make it part of FM, and then save it as a PDF and append it to PDF 1 to create the final PDF 3. Any thoughts would be greatly appreciated. Thank you.

  41. Just after some help getting the expression correct in this script: If IsEmpty(pk_InvoiceID) ; "No Invoice exists." ; "" Can't seem to get the expression right according to the "Specify Calculation window" - usually is looking for additional operators, or I have too many/not enough "(" or ")". When building the line (I'm adding to an existing script), I use the script editor to start, then select "If" in the left hand window, and then start to build the expression in the 'specify calculation' window. TIA

      • Like
    • 7 replies
    • 2.9k views
  42. Started by El_Pablo,

    Hi, What would be the best practice to develop multilingual script? Some script have string variables and I would like to make the solution multilingual. I though about a "getText (stringID, langCode)" custom function that would fetch the string from a global variable, but I'm not sure about this practice. Otherwise, I don't think creating a script to fetch the data is best method. Example Set Variable [$title; getText (4; "EN")]; Set Variable [$msg; getText (1; "EN")]; Show custom dialog [$title; $msg]; Thanks for help

      • Like
    • 4 replies
    • 1.6k views
  43. Started by sam215,

    I wan tot convert date from mm/dd/yyyy to yyyy-mm-dd .

  44. Started by qube99,

    I am writing a pretty elaborate script, at least for me it's elaborate. It features about 5 levels of nested conditional loops all based on random numbers of various types. I ran into one stage where a script was calling itself recursively which FMP choked on. So what I did was to write each loop as a separate script and this works great for me. I used a bunch of global variables plus local variables. The thing is now in a bunch of small, highly manageable chunks. This also makes the scripts a lot easier to understand since the whole thing was way too much to wrap my head around. I see large complex scripts all the time so I began to wonder if what I did is a Best…

      • Like
    • 9 replies
    • 3.2k views
  45. Started by qube99,

    I recently tested a few script methods for speed and thought I'd share what I saw. I have a FMP project that constructs a ternary tree database. I set up a design and ran it under varying circumstances in order to determine my best practices for this project. I am learning FMP and would like to know these things for all my projects. As a baseline I ran 2000 nodes of a single design. I looked at 3 main script parts. Times are in milliseconds No filter, no find, no print 1569, 1611, 1580 No filter, no find, with print 5446, 5512, 5473 about 4 seconds to print 2000 records 1x1. No filter, with find, with print 31970, 31940, 31936 That scripted find …

  46. Started by Jhestler,

    Hi All, An interesting new dilemma has arisen out of my utilization of the very common "Insert File" script step. The problem is that the script doesn't seem to work on files that have a lengthy file name. On occasion, it's even caused the database to crash. I'm inserting only the filepath, not the actual file: I made sure of that. Is there a character limit on the names of the files that can be attached to a database records using the "Insert File" script step? And if so, can somebody suggest a workaround to prevent crashing in the event that a user attempts to attach a file with a lengthy filename to a database record? One further less important …

    • 2 replies
    • 1.7k views
  47. Started by carlosnorvik,

    Hello: Is using MiddleValues a correct way for scraping data from websites? I built a small file that should update exchange rates daily (press the update button in the attachment). It is failry simple and works, but I wonder if there is a better way of doing it. Most of the rates are pulled from The European Central Bank, for the less commonn ones I had to look around. One gotcha is that for any format change in the inserted URL's, The MiddleValues formula will have to change. If anybody finds it useful, please feel free to use or modify it. Carlos exchange.fmp12.zip

    • 5 replies
    • 995 views
  48. Just as the title says, I need to launch a script when a user adds a new portal row. I am trying to use modify - but it doesnt seem to work when a new row is added, maybe because its not an existing row? Not sure. Any work arounds for this or ideas on how I can prompt a script to run when a new portal record is created? Thanks!

      • Like
    • 2 replies
    • 3.3k views
  49. Hi: I have 4 clone files, managing inventory, invoicing, ordering, etc. They are used by companies in 4 different cuntries, each one slightly tweaked to suit country specific regulations. I want to do unify value lists, scripts and so on, so that whenever possible I only have to modify one file to make changes that work in all files. I started doing this today with a new feature, involving technical part drawings, so that you can access the drawing when ordering a part (via a button on the line of the portal corresponding to the item). I use similar macros with no problem inside a single file, but can't get it to work with this new file, it does not perform the …

  50. Started by lesterd,

    I Have a script that searches a relational database for information. The information it searches is in a calculation field. Each person in the relational database would have seven records with a calculation code Here are is an example for one person: ID Name Code (Calculation) 12345 John Jones 222-21-17 12345 John Jones 726-19-17 12345 John Jones 890-56-17 12345 John Jones 154-22-17 12345 John Jones 276-03-17 12345 John Jones 272-09-17 12345 John Jones 999-99-17 When I want to find all the people in the database that have the same code, it fi…

    • 2 replies
    • 687 views
  51. I’ve got a puzzling problem when ‘setting’ a text field through the use of “LeftValues” & “MiddleValues”. I’m trying to move multiple fields of information from a master table to a secondary table. I’ve concatenated several fields contained in my master table [containing both text and numeric information] into a global text field. I then copied this text field in the master table and pasted it into another global text field in my secondary table [ex: gtext]. I then used the field ‘set’ function to assign the values from the global text field into specific fields in the secondary table using the “LeftValue & MiddleValue” functions. The numeric field…

      • Like
    • 4 replies
    • 2.2k views
  52. I want to use a GTRR script step to locate & navigate to a single record, and then delete that record. This simple script works fine when the GTRR step points to a related record within the local file: Go to Related Record [Show only related records; From table: "CATALOG"; Using layout: "GFH Items" (Equipment_CatalogToVendors); New Window] Delete Record/Request [] However, when the GTRR step points to a record and a layout in a separate (external) Filemaker file, Filemaker opens the related record in a new window (as expected,) BUT that new window is not (!) active, it is hidden behind the current window in the original file. Go to Related Record [Show only r…

      • Like
    • 11 replies
    • 2k views
  53. On each layout exit, I set a $$PreviousLayout variable = Get(Current Layout), and I map the back button to go to layout via calculation set to $$Previous Layout. The var gets written correctly, but it refuses to go to said layout. What am I doing wrong?

      • Like
    • 8 replies
    • 5.1k views
  54. Hello folks, Please forgive me if this topic is the wrong place. My problem is this: I have a customers database that stores data like: name, address, taxing number, etc... I have a field that is an auto enter calculation that registers who created the record using a simple "Get ( AccountName )". I would like to register who edited the record for the last time, or if possible create a log of dates and who edited the record. Can you please show me how to achieve this? Thanks,

    • 5 replies
    • 1.4k views
  55. I've created a database that contains several information layouts that I would like to cycle through "indefinitely" on a display board without interaction. I wish to pause on each layout for a designated period of time ( 2 minutes?) and move to the next. I've not done something like this before and would like advice on how to proceed. Thanks in advance for your help.

  56. We have to generate monthly reports to the company regarding miles traveled and fuel purchased. These reports have to start at the beginning day of each month. As I have it now, when you start a new month, the variable ($EndDate) is set to be the date field of the last record in the portal. When the new month record opens up it has a starting date. Now it is set to SetField as $EndDate + 1. This is fine if your last entry on the previous month as on the final day of that month. However, lets say a driver makes his last trip to Austin, TX on August 26th and this is where he makes his last monthly entry to the DB. As of now, when he creates the new monthly r…

  57. My driver's get bonus income when they reach a certain plateau during a trip. These bonus levels change with increased mileage. Because of this, the bonus levels are entered manually by the driver. On my Driver Pay layout I have a calculation field (TotalMileage) that states the number of total miles on that trip. Basically "EndingMileage" - "StartingMileage" = "TotalMileage" I want to trigger a script upon exiting the TotalMileage field that will look at the data and popup up a reminder for the driver to enter a bonus level IF the total mileage is above the first bonus level. My question is; what function step will handle this for me. IE; your total milea…

      • Like
    • 4 replies
    • 1.7k views
  58. Started by pctechtv,

    Does anybody know if there are ways to store a Primary Key and a Layout to track the back and forth navigation in your database. I would then want to attach a button to navigate back and forth. Now that I figured out that silly flashing error that I was dealing with http://fmforums.com/forum/topic/90159-freez-window-flash-pop/ I am fully enjoying the power of Finds via Scripting that make it look like nothing else happened but the production of your desired result. Tell me are there things to know about strain on the system or memory if you do a lot of these? Or can I just do as much of this that make sense (of course within the scope of best practice)?

  59. I have a few FMP projects that I run where I need to process tens of thousands of records, and each process takes time. So I want to be able to set up additional instances that can just run overnight on various computers in my office to accomplish these projects. My problem is, one instance will grab a record, and then sometimes another instance will grab the same record and process it. While this doesn't really matter (except for the wasted time) for some applications, in particular, for marketing emails, this is a problem. I'm trying this: Set Error Capture [ On ] 
Perform Find [ Specified Find Requests: Find Records; Criteria: Test::Sent: “="no"” ] Go…

  60. Started by Bempster,

    I have a layout that is designed to print on a catalog envelope. Problem is that the envelope works better if it is fed from the bottom. Is there a way to script in a page rotation before printing. It does not appear as an option in the print dialog.

  61. Started by pctechtv,

    I able to get results in most of my Scripts using the Freeze Window step. The only ones that don’t seem to work is the one that go to Enter Find Mode or Perform Find. I have read some information warning that certain other Steps in a script will cancel it out. Does Enter Find Mode or Perform Find cancel out the Freeze Window Script Step? A question I would like to know if it can be answered that simply, is can you have the process that uses Enter Find Mode or Perform Find in a script not make the screen flash or redraw with the Freeze Window Step or some other procedure?

    • 8 replies
    • 1.3k views
  62. Started by qube99,

    This is a script that launches a modal picker window. The last script step inserts the cursor into a field for typing. As you can see I have tried 3 methods for inserting the cursor. Â After a variable number of uses FileMaker crashes. It crashes with any of the 3 script steps that insert the cursor in the field. Â When the script is run from the debugger the cursor inserts properly and FileMaker does not crash. Â When the last script step is disabled it does not crash but you now have to click into the field for typing. Â I am at a loss as to how to get this to work. An image of the script is attached. Â I'm working in FMPA 12.0v2 on Windows 8. Â Â …

    • 4 replies
    • 1.1k views
  63. Started by fmow,

    Can I just run this by you guys to tell me what you think. I need a few more experienced eyes to catch any mistakes here, since this will be the backbone for a lot of operations in my db. Set Variable [ $Var; Value: Get ( ActiveFieldContents ) ] Go to Layout [ “‘Clients” (Clients) ] Perform Find [ Specified Find Requests: Find Records; Criteria: Clients::NameSurname “=$Var” ] [ Restore ] Set Variable [ $Var2; Value:Clkients::_pk_Client_List_Serial_Number ] Go to Layout [ original layout ] Set Field [ Projects::__fkClientID; Projects::__fkClientID=$Var2 ] Commit Records/Requests Exit Script [ ] So basically I am in the Projects layout, grabbing a Client name…

      • Like
    • 8 replies
    • 1.6k views
  64. Started by pctechtv,

    I have been watching some training on FileMaker, and currently the instructor is showing how to build a system that navigates the Layouts in a solution. In the early stage of it, we have only added the back button. An interesting thing has come up, and I figured I am better of trying to fully understand what is going on rather than just be satisfied I can get it working in my solution. For the back button we built one Script that get attached to the Layout via a Trigger (it stores a variable that is list of Layout numbers) and one that gets attached to the button (It retrieve the Layout we want to return to and removes it from list). The instructor than explains why it wo…

    • 3 replies
    • 825 views
  65. (apologies in advance if this is in the wrong sub forum. I tried my best to figure out where to post the topic.) I 'd like to design a table where I tabulate a project number, an employee id, and have them input their work hours there, on a daily basis. So the layout will be project id | employee id | Week No | Monday | Tuesday | (etc.) | Sunday | Week no, auto generated, and one will just input hours per project each day, null values for no work on the project. But how do I auto generate new records each week with the week number increasing? I 'd prefer that over the employee selecting the week of the year themselves to avoid errors. Thanks!

    • 3 replies
    • 1.7k views
  66. Does anybody have an example of a Script using a field of values and looping through it? I had found the FileMaker article here http://help.filemaker.com/app/answers/detail/a_id/2403 and added the good advice, that this is not currently the best way to do this, and other advice to not use copy and paste (a better way is to set variables and retrieve them was the advice of many knowledgeable people). In this article it show a way to use a loop to run through the records in a portal, and send the useful data to another field. It works but does not seem to be that efficient. One thing that makes me wonder about it, is this is the only script that show and hour glass in my so…

      • Like
    • 5 replies
    • 891 views
  67. Started by Kishan_Canoo,

    I have created a simple cash register and using a portal to add items via a barcode scanner reader and by using Exit Script [Result: False] it is automatically moved to another portal row i want to know if there is a way to cancel the Exit Script [Result: False] with a command button to validate the transaction. Thanks to share your ideas.

    • 6 replies
    • 1.3k views
  68. // If [ $$SCRIPT_TRIGGER = "Off" ] // Set Variable [ $$SCRIPT_TRIGGER; Value:"On" ] // Exit Script [ ] // End If The above is code from a starter solution, can someone help me figure out what exactly it's supposed to do?

      • Like
    • 3 replies
    • 2.1k views
  69. Started by pctechtv,

    We have a need for a user to click on a checkbox for purpose of deeming something Complete. It is an important decision in our solution because once deemed Complete it will set up other options we need to do. We want to be sure this is the correct decision. I would like know about any methods of making an important decisions trigger have to be released with a safety. I was imagining a Script that displays a message that kind of gives a checklist or some things to consider before deeming something Complete. I guess a Script could take a user to a layout and give them just that. a checklist that once all criteria is met (checked) it could continue the Script and allow for t…

  70. Started by robyf1,

    hello everyone, sorry for my english, I use FM6 when i use copy and paste (between databases): Sometimes (only with win7) don't works well copy command (pasted, sometime the field is empty or the text is equals to before copy) Anyone suggest me an alternative method? Thanks in advance

  71. Started by haani,

    Hi, I am working on a database and I have just found a problem with it that I can't seem to fix, as you can see from the image, I have added a portal row to a layout which includes check boxes and I have a send email button at the bottom which runs the following script: Set Field [ Case::chk box; 1 ] Go to Layout [ â��Quote Viewâ�� (Consultant) ] Set Variable [ $FilePath; Value: Get ( TemporaryPath ) & "Quote " & Case::Case Number & ".pdf" ] Save Records as PDF [ File Name: â��file:$FilePathâ��; Current record ] Send Mail [ Send via E-mail Client; To: Case::Solicitor's Email; Subject: "New Quote: " & Case::Case Number & " "; Message: …

    • 9 replies
    • 1.5k views
  72. Started by bobwhallz,

    hi. I an new using Filemaker (2months). I have a small shipping database i built for my small business. I would like to be able to track my shipment. I want to check in items and check them out. However i have no idea on how i could proceed. I need help with your guidance so i can build that option. Or if there is a tutorial like that i would like to learn from it. so I want to display maybe in a protal a list of all checked in items with a check out option. when i click on check out, the item is removed a placed into the check out portal. the catch is the item can only be checked out if it is on the first position. if there is an item that precedes it , i would like to s…

    • 2 replies
    • 1.1k views
  73. Started by Harry,

    Hello to all of the Board! I have a php site that generates barcodes. It's used company wide so i can't change that. I'm trying to print EAN13 barcodes via a script - using the Insert From URL function with a calculation. The URL depends on our product stock code. How do i syntax the script? So far I have: Insert from URL [select; No dialog; ProductRegister::EAN13Calc, "192.168.2.1/ean13.php?stockcode=" & product::stockcode] But it doesn't work. is my syntax correct? How do I append a field value onto the URL? Thanks, H Ean13CALC is a container field.

    • 2 replies
    • 772 views
  74. Started by Jamespatricksmith,

    Hello, I wonder if anyone can help me. I have 5 databases which will be opened with a startup script and in the layout of each database will be a menu to switch between databases. My question is how can I do this smoothly? Basically I want to emulate what happens when you press control tab which switches very cleanly between windows. I have tried using the script "select window" but the windows get minimised and maximised making the screen flash and is quite distracting. I have also tried the "open file" script step but again this has a delay and becomes quite ugly. The ideal is to emulate the control/tab functionality but I have no idea how. Thanks James

  75. Started by mhotwagner,

    Hi All, I'm pretty new to FileMaker, but I've recently taken a new position, and we use it for our primary customer database. We're working to schedule training with the guy who set up our system, but until he gets back in touch, I've got a problem I'd like to tackle. We use an import script he wrote to bring new classes (did I mention we're a school?) into the database, and the script used to automatically remove any duplicates that came in, preserving only the new, unique classes (based on, I believe, two variables: an id number, and a class-code that is a combination of the class info and the start date (and thus, unique)). I'm unaware of any changes that have b…

    • 5 replies
    • 1k views
  76. Hello Board! We use FM12 to log products that are being packed. Each product has a unique barcode number of 10 digit numbers. No one is the same. We scan them into a field and print a label. There is an Auto-Validation 'Unique' parameter on that field. However, now, we need to have some of those products returned, rechecked and then resent out to other customers. What I want is a script that gets the Barcode Number, checks it against the QC table, if the number is not there, it enters it; if it is there, it checks our 'Returns' Table and then accepts it. If it is in the QC table but not in the 'Returns' table, i need it to 'Error' in some way. Can …

    • 7 replies
    • 932 views
  77. I have two users who cannot use ANY scripts in the database. This is a file we've had for about 5 years. Once a year we make a copy of the file and it's our new database for the next fiscal year. We've never had a problem. I'm using FM 11.0v1 on a Mac using OSX 10.9 and everything is fine and dandy. No issues. Another user on a Mac is also fine. However, I have two users on Windows (one user on Windows XP sp3 and another on Windows 8) using two different versions of FM (8.5v 1 and 11.0 v1) who cannot run any scripts. If you start any script, it doesn't run. I've even tried creating simple scripts that simply change a field to "9" and they still don't run. …

    • 0 replies
    • 1.3k views
  78. I want it to be part of a script that assigns fks to a child table. I'd like to check if the user has already inputted. To avoid a duplicate record upon the second time a user might accidentaly or in a change of mind re-enters another choice in the field.

      • Like
    • 3 replies
    • 1.3k views
  79. Is there any way to print a multi-page pdf stored in a container field by script (without human intervention)? For single page PDFs, you can simply put an 8.5x11 container on an 8.5x11 layout, but I can't see a way to do multiple pages...

    • 3 replies
    • 1.6k views
  80. Started by brainonastick,

    Hi there, As far as I know the Get(Current Date) function is static and uses the computer clock date at the time the calcualtion is first created. I want the date to update at the start of every new day (at midnight) so that all date-dependent calculations auto-refresh too. How do I do this?

      • Like
    • 15 replies
    • 17.8k views
  81. Hi. I have two fields on a layout. The first is the id field of a related table. It is a dropdown menu that shows a value list which uses the "Also display values from a second field" option so that it shows "name" values instead of the id itself. On top of that field is a second field. It is the "name" field of the related table (edit box, not dropdown). The top field allows entry in both Browse and Find Modes. I allow it in Browse Mode so that it can change color on hover (I didn't want to make it a button because I also need to enter data into it in Find Mode). The top field has a script trigger (onObjectEnter) that checks to see if the user is holding down a modifier …

      • Like
    • 5 replies
    • 1.6k views
  82. Hello, I'm hoping someone can help me out with what I thought would be a simple task. I can't figure out how to insert a portal row between exisiting items. I'm using the starter invoice template and just as there is "X" to delete a row I want a "+" button to add a row after the line item. So a user can add a row anywhere on the invoice layout wether it's between rows 1 and 2 or 10 and 11. Can someone point me in the right direction? I have attached the sample file I've been working with. thanks, Robert orginial invoice.zip

    • 2 replies
    • 3.1k views
  83. Started by madman411,

    Hello Everyone, I am trying to put together a booking section to my solution. Our assets table [system_assets] is provided in List View. I'm trying to put two global fields "start date" and "end date" in the header. The search will display the assets that are available within that date range. Here's where I'm also failing: Do I "track" the assets within a "tracking" table? I'm failing to create the right relationship to make this work. Ideas?

    • 16 replies
    • 1.4k views
  84. Started by charisse,

    Hi! I multiple records with multiple images (number varies). I am trying to write a script that will rename the exported images to another field's contents and then append the new file name with _1 _2... for each image attached to that particular record. For example: 1_1 1_2 1_3 2_1 2_2 3_1 This is what I have so far. It is working, but it is only grabbing one image per record and skipping the others. Returning only 1_1, 2_1, 3_1 ... Any ideas? Go to Record/Request/Page [First] Loop Set Variable [ $filePath; Value:Get ( DesktopPath ) & "/ExportFolder/" & Table:Field Name & "_" & List ( 1 ; 10 ) ] Export Field Contents [ Images::Imag…

    • 16 replies
    • 1.5k views
  85. Started by fmow,

    This is my attempt at a script extending the "ipad/iphone aware" script hosted at filemakers website. ( http://help.filemaker.com/app/answers/detail/a_id/8079 ) ***It requires that one uses the convention LayoutName_Ipad, LayoutName_Iphone, with the pc/mac layouts not having the "_" suffix. Of course the convention can be changed. Also the fm website triggers the script with the FirstWindowOpen. I am not sure why they've elected this. Surely the check should be performed at every layout, and then the user is taken to the iphone/ipad counterpart.** If [ PatternCount ( Get ( ApplicationVersion ) ; "Go_iPad" ) = 1 ] Go to Layout [ If( Right( Get(LayoutName); 4) = "Ipad…

      • Like
    • 2 replies
    • 955 views
  86. Started by fmow,

    A pretty rudimentary script, where I use a placeholder via a global field, to grad some values and pks and paste them in the appropriate tables. No matter what I choose at the end while I am on a layout trying to grab the pk value from the new record I created, go to field then select all then copy, or have one field = to another, or straight copy with select all included, I get an error 102, and the pk value is never copied. Is there something apparently wrong in what I am doing? Perhaps I might need to post the full script. //EDIT: solved, I was missing a record commit apparently.

      • Like
    • 2 replies
    • 806 views
  87. Started by milky,

    Hi everyone, is it possible to create a script that uses the date in a field and opens Outlook and creates an appointment for that particular date. Any help would be appreciated.

    • 2 replies
    • 868 views
  88. Started by Oyseka,

    Hi all, I have a simple script to produce escalation notices based on the user and a time since last run but the blasted thing won't execute. What am I doing wrong ? With debugger the script exits at the first If statement when I am logged on as Sid. Â Screenshot of the script is attached Â

      • Like
    • 13 replies
    • 1.7k views
  89. Hi, I'm having a problem with sending e-mail using a script and I wonder if someone can point me in the right direction. It's very simple, I have a field with the e-mail address in it and have told the script to use this as 'send to' but it doesn't get carried across to my default e-mail package (Windows Live but I've tried others and the same thing happens). It's just blank. Other fields are OK like Subject and Message content but not send to. The other problem is that it won't attach a file either. In the script, I make a PDF of the screen, save it and attach it to the e-mail. It saves the PDF but won't attach. I've check directory paths, moved directory pa…

    • 6 replies
    • 1.7k views
  90. Started by JTSmith,

    I just need a simple calc that is "Record Age". I'd prefer a format (2 hours, 14 minutes), for example. I don't need days, just hours and minutes. Can anyone point me in the right direction? I would appreciate any help, thanks!

      • Like
    • 2 replies
    • 806 views
  91. Was not sure to post this.. but actually came across this a week ago while testing OS X 10.9 GM version. It you try to open a webpage via the script step "Open URL". it does not work with safari. You do not get any error.. it just refreshes the current page. Probably has something to do with new security/permission rules.. Probably will have to add "FileMaker" into the "Allow Apps to control computer", security settings..

      • Like
    • 4 replies
    • 1.1k views
  92. Hello everyone, I have three related tables: Main Menu, Activities and Line Items. In my Activities table I have some fields to describe each activity and a portal (from Line Items) to input the different tasks under each activity. Once ALL the tasks for a particular activity are completed (Line Items::Task Status), the field "Activity Status" in my Activities table changes from "Open" to "Finished" (calculation field). I also have a calculation field that assigns 1 to each open activity and 0 to each finished activity, and a summary field that adds all the 1 and 0 to determine the number of open activities at a given point. I have created a calculation field in my M…

    • 5 replies
    • 1.3k views
  93. Hello. I have been able to export selected records to a portal in a related table before by including a specific Find criteria in a script, but now I'm trying to create a script that allows me to export a set of records selected after performing a Find with a specific criteria (search criteria NOT in script) to a portal in a related table and it is not working. Can somebody shed some light? Thanks. NR

    • 9 replies
    • 1.1k views
  94. Hello - I am trying to do the following:  I have a technician that needs to go into each room in a house, record a bunch of data in a form, and have all the data for each room link back to the one customer who owns the house.  So far I have - a database and table of customers with all the fields you would expect. A field list with all the possible room options  I am trying to write a script that will do the following:  Loop through each one of the rooms in the list. Add a new record for each room Set a property for that record to be the name of the room. Link these records some how back to the single customer who's house the rooms are in.   So f…

    • 6 replies
    • 1.7k views
  95. Started by nozbilenler,

    Thank you for help  I am planning a button for Bill Payment.  Bill Payment mass end of the month to pay the bill for a lot.  Also for payment as a single  Goodbye  EK: Demo File

  96. Started by John Chamberlain,

    When I open a file, I want to set a field to the current year value. How can I do this?

  97. Started by JTSmith,

    I have a table called Quote, a table called Properties, and a table called Phone Calls. Quotes layout shows a portal of properties, and I hit a button on each portal row to make a phone call, which shows in the call portal. It puts the name of the property in a log field. I'd like to do some conditional formatting on the Properties portal that turns the text a color IF the name of the property is in the log. I can't seem to figure this one out... Any advice would be greatly appreciated.

      • Like
    • 3 replies
    • 817 views
  98. Started by Jonah74,

    Hi  Can anyone tell me how to replace a particular fields contents with different values for individual records or serial numbers rather than a found set? At the moment I can get it to replace field contents but it does it for the whole found set not just the one individual record I want. For instance, I have a DB that records car journeys which are given individual record numbers (automatic serial numbers) and has a cost in two fields. What I'm trying to do is: if someone cancels a journey I'd like to be able to click a button that says Cancel and a script runs that looks at that individual record ID and inserts £0.00 in two fields and overwrites the cost thats in…

    • 7 replies
    • 1.4k views
  99. Hi all, I'm stuck, I hope you can help me. On the internet I came across a great tool called ; Dynamic Portals in Filemaker Pro (

  100. Started by Ascarine,

    Hey guys, I'm trying to make a script trigger only commit a record when the contents of it have been changed and the field has been exited. OnModify forces the change after every keystroke, where as OnExit will commit the record whether you've changed anything or not. I've tried adding validation onto the OnExit so that it checks what the previous record was like and then only updates if that record's field(s) were different (did this with If ( (field_1 = field_2) and (field_3 = field_4)..... ) End If ). For instance, if someone changes the name of a product it should create a history record. However, if they click into the name field, and then click out it sh…

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.