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 not really sure I'm posting in the correct sub-forum, but hoping for the best 🙂 And I have two questions, which I'll ask in two posts. Question: My Proposal db has a field called Fee Amount. I use this field in two instances: — Form View, which I use to prepare new Proposals. — List View, which lets me see a list of open proposals. I use a simple script to only show open Proposals, based on a field called Open. So far, so good. I want to restrict data entry in Fee Amount. Data can only be changed through the original Proposal (the Form View instance). I do not want Fee Amount changeable when I am looking at the list. Is this possible?…

  2. Started by Angus McKinnon,

    I've got a persistent problem with the FM solution I maintain. It's used to manage an equipment hire company, so we have a couple of client machines at opposite ends of the warehouse, as well some in the offices upstairs. What's happening is warehouse staff are frequently making changes to records, but not committing their changes. Sometimes as simple as changing a status field when checking a returned hire in. Of course, that's a problem when someone in the office needs to access that record, and can't. Or if a machine crashes (hours or days later) and the changes are lost. I'm trying to add script triggers to fields etc. to automatically commit a record…

  3. Started by JMart,

    Hi guys, I have the following script that does not display the custom dialog. I did a debug, and it does generate an "Error 401". I have the same setup in order scripts, and it works fine. It seems to be skipping the "If Get lasterror" Can someone please enlighten me on what I could be doing wrong? Thanks JMart

  4. Started by JMart,

    Night all, I need some help with a script; I can figure out how to handle it. I have two tables, table A and table B Table A (Customers) Field: ShipTo Table B (Ship To) Field: ShipTo When a user types a ship-to location in the customer table and the record does not exist in the ship-to table, I want the record to be created automatically in the ship-to table. This is what I have, but I have two issues. 1 - Once executed, it locks the layout, and I have to press Show All 2 - If the location exists in the second table, it creates a blank record What am I doing wrong? Any help is appreciated, or am I trying to do …

  5. Hi all, I can not figure out how to pass a parameter to a subscript to be used in the filename when exporting records to excel if a user selection in a custom dialog window changes the found count of records. The problem is not specific to the export to "Excel", but rather my inability to get the updated "found count" into the exported filename. So, in this aspect, I consider this a variable that needs to update before it is processed by the variable calculation that "makes" the filename. I know my problem lies in the "second" level of branching that can occur if User selects an Export button when (found count = 0) which I think would be rare, but possible.…

  6. Hi all, I have a script that I would like to use in multiple "similar" situations. To do this, I need to pass a parameter to set a variable for it to FIND a record in the PERFORM FIND script step - specifically in the EDIT FIND REQUEST dialog (see screenshot attached). Any help is appreciated, thanks.

  7. Hi all, I need some help again. I understand FileMaker provides two different script steps to "output" an Excel file: 1. Save Records as Excel Positives: Provides the ability to select CURRENT or FOUND SET of records. Negatives: Does not provide the option to select which fields to "save" Does not provide the option to select the order of the fields when being "saved". 2. Export Records Positives: Provides the option to select which fields to "export" Provides the option to select the order of the fields when being "exported". Negatives: Does not give us the ability to select CURRENT or FOUN…

  8. Hi all, I have three buttons in a popover. Each button exports records as excel with the only difference among the three buttons is "which" records are to be exported: Current Record (Always just one record) Found Records (Always a varied quantity) All Records (All records within the table) Initially, I had three separate scripts (one for each button) and they all worked. Now, I want to consolidate these three scripts into one script. I thought I could branch each of the three button's script steps by using each button's unique object name as the differentiator. WHAT I DID I created a variable to contain the selected "objec…

  9. Hi all, I have spent all day stuck on this script. I am trying to "retrofit" this script by using JSON to pass multiple parameters into the script. I have attached two screenshots. SCREENSHOT NAME: script_with_variable_not_working.png This screenshot shows all script steps, PLUS, I commented in the beginning of the script the JSON I am using as Optional Script Parameters. This screenshot also shows an overlay of the dataviewer showing the incorrect results of the variable "$_container_field_name". SCREENSHOT NAME: script_set_field_by_name_not_working.png This screenshot shows line 16 throws the error message in red at the bottom: [102] Field is mi…

  10. Hello, My first time trying to pass more than one parameter to a script. My research (potentially flawed) has led me to believe that one of the most robust ways of passing multiple parameters was to use JSON. I have copied JSON code from the internet and modified the code to try and work with my data to accomplish my task. I've tried my best, but I need help. This is the JSON I have in the "Optional Script Parameter" dialog window: JSONSetElement ( "" ; ["name"; item_feature_location::item_feature_location_name; JSONString ]; ["status_type"; item_feature_location__status_portal__status_type::status_type_name; JSONString ] ) When I c…

  11. I have a button bar where one of the segments is a Popover Button called "Sort". Once the "Sort" popover is activated, the User is presented with 3 buttons in which to choose from (see screenshot): (#1) Sort - Default Order (I define this sort in the script based on what I believe is the most helpful to Users.) (#2) Sort - User Defined Order (Script I currently have is "Sort Record (Dialog On)" (#3) Unsort (I simply use the "Unsort Record" script step.) Button #1 and #3 are fine. What I need help with is button #2. If I use the Script (Sort Records - Dialog On) (see screenshot), the User is presented with dialog that is not user frie…

  12. I'm having trouble getting a scripted import to work. I have 2 files hosted on the same server and I want to import from one to the other (all records in the table). The script works when I run it from the file I'm importing into that I have open locally against the hosted file but when I run it as a Server Scheduled script it fails to do the import part. (It DOES the truncates just fine!) Set Variable $sourcepath = "file:/HostName/Filename" ("file:/MyHostingProvider.cloud/FileImportingFromName") Go to Layout [the appropriate layout] Truncate Table [ dialog off; ,Current Table>] Import Records [dialog off; appropriate table; $sourcepath] Wha…

  13. Hi, is there a way to get a text list of all subsummary values of the current list layout? My layout looks like this (simplified): Account1 12.33 Account1 25.44 Total Account1 47.77 Account2 36.11 Account2 52.09 Total Account2 88.20 ... Is there an easy way to get a text list of all the subsummary fields that looks like this: Account1 47.77 Account2 88.20 ... At the moment, I am using an ExecuteSQL query, but it gets too complex for that small task (the FoundSet is more complicated). Thanks a lot for any help!

  14. Started by RichGags,

    Hi all. I have a field called Start Time. Typically users enter something like "6pm" which I have the layout object set to display the format as "6:00 PM". The issue is—the data is still stored as "6pm" so when it shows up on layouts in <<Start Time>> it shows as how its stored and not formatted nicely. I am trying to replace the "6pm" input with the desired format of "6:00 PM" in the stored field but I am having trouble. I have tried the Auto Enter Calculated Value with GetAsTime ( Start Time ) and it didnt work. I also created a script and script trigger, onObjectExit to Set Field [ Event::Start Time; GetAsTime ( Event::Start Time ) ] but i…

  15. Started by 21st Century Man,

    Greetings all: I'm trying to code an effect where as a user enters their account name (to log into a FileMaker Pro database via WebDIrect), I want a button to appear ("Proceed") just after they enter their qualified name in the field, e.g., If their login name is Blivet, just after the user enters the letter "t"--the last letter of their login name--the Proceed button appears so they can continue with the login procedure. (There'd be a calculation in the "Hide Object When..." for the Proceed button to appear.) I tried using the Commit Record script step (as a script trigger (OnKeystrokeEnter)) on the AccountName field, but I get a pop-up message from FileMaker P…

  16. Hi Everyone, I've a script to change the colour of some selected text, and in that vein I'd like to make one that changes the line spacing so that I can have indented paragraphs that look like bullet point lists, is this possible? The way to do it long hand is to go Format > Line Spacing > Other, and in my case it would be Left 0.8 and First -0.3 (as attached screen grab), but I can't figure out or find any answers on the web if it's possible to do this via a script, for the selected paragraphs / text? My FM version is 19.6.3 Many thanks for any ideas

  17. Hello, I am stuck. I have searched high and low prior to coming here for help. I have a script that works on a table/layout called "document". It inserts either a "Picture" or a "File" depending upon what the user selects via a dialogue prompt. The picture or file is being saved to external storage and I can verify that these inserted files exist in storage by viewing the external storage file system. So far, so good. I duplicated this script and modified it so it could work for another table/layout called "file_extension_type". With this modified script, I can insert a "file" - but not a "picture". When using script debugger to troubleshoot - I do re…

  18. Hi all: I threw together a JSON sandbox file (attached) and looking at one result, I'm not sure if step 18 in the script, Nested Array/Children Records is coded correctly. What that script does is create a field that includes parent and child records between the Grant and District tables. When run, if you look at the JSON field's result, it doesn't (to me) look right--shouldn't the District key be indented as a array or no? The reason why I ask is that when I use the JSONListKeys in the Data Viewer as JSONListKeys ( GRANT::JSON ; "Grant" ), it lists a record count instead of "District," so what am I missing here...or am I just being an absolute numpty? Cheers, …

  19. Started by Bill_misc_IT,

    I have a FMP solution that is used to print box labels for our products, prior to shipping to customers. We have many layouts, which represent the label format for each customer's specific requirements. For context, the layouts are named as "Barcode-" and a customer code. For example: Customer Name = Magna Customer code = MAG Layout name = "Barcode-MAG" If a customer does not have a specific requirement, we default to a layout named "Barcode-Default". Currently, we have a printing script, with the following steps, which are used to "check for a customer specific layout" and revert to the default layout, if none exists. The steps (which …

  20. Hi all: I'm using a script to temporarily store, then print, a document from our server (FMS v21.0.2.202) to a remote printer. (Script attached.) The problem is, just at the end of the script--using the Print command--the file opens on the end-user's computer via their .pdf viewing program. Is there a way to prevent (or circumvent) the opening of the document using their .pdf program so they don't see the document at all? Cheers, Rich Script.pdf

  21. I am brand new to FMP, I have 11 days left on my trial before I have to make a case to my company to buy it. I am trying to replace an Access database because it randomly crashes. I need a little help. Currently, my access database (a contract management database) has a form that has a button for adding a new record to a table. The table houses multiple types of contracts Non-Disclosure Agreements, Contracts, etc. My naming convention for those records are Non-Disclosure Agreements start with NDA, Contracts start with CON. The sequence is NDA-24-001, where the second set of characters is the year the agreement was fully executed, and the third is the next sequential …

  22. I'm close, but I don't know where I'm muffing it; the user receives the e-mail, but no .pdf file attachment. Here's the script text: WHen the script runs, I get the attached error message. What do I need to tweak? (Running FMS v20.x on a Windows network.) Cheers, Rich

  23. Howdy all, I have a script that performs a Find using the OnRecordLoad script trigger. However, if a user manually uses the Show All Records command, the script trigger won't fire because there's no trigger; a record isn't loaded until the user clicks on a field. Is there a means of firing the script after such a circumstance? Cheers, Rich

  24. Started by Rich S,

    Howdy all: I'm working on a nabbed a Dwindling Value List example file off the 'net and in the JOB layout, I can't see why the List_SelectedPeople__lxt field doesn't update after deleting its corresponding record from the portal. (A script trigger fires when deleting a record from the portal that (should) delete the corresponding ID in the aforementioned field.) What happens is, when you click on the "<-Click Me ->" pop-up menu, a value list of names appears, you click a name, it commits, then dwindes the list. That part works fine. The problem is, if you click the Delete link in a portal record, it'll dutifully delete the portal record (with its id_Peopl…

  25. Started by aletournai,

    Hello everyone, here is my problem, I have a “request list” table in it there are for each month and for each service provider several records which contain the month and year, activity and name of the user as well as the primary key of the provider. I display this in an external table to list its services over a month, previous month and following month allows me to move from one month to another using as a script: Search for worker ID and month+1 and year My problem is if it doesn't work in 2/2024 but in 3/2024 it doesn't necessarily show it to me like I do +1. So I don't see how to make my script for this. Thank you for your help

  26. We have a database of musical compositions, They are categorized by keywords, and the keywords are organized into categories. So for example, category 7 has vocals, and within that category there are vocal_rap, yodel, etc. Every track has an ID and there is a join table of ID's to keyword ID's, which in turn is related to a table of keyword ID's. to category ID's. I need to first determine if any of a track's keywords are in category 7. Thats easy, I just go to the related ID in the join table, and then constrain the found set a set of keyword ID's that are in category 7. But now I further need to find if any of those found also have a keyword ID of 1 (acapella) or 2…

  27. Hi all, I'm current running a script on FileMaker Server 2024 every 15 minutes. It starts by going to a layout where the primary table is an ODBC connection to the MySQL server of a website (left side of image). On the layout is also a portal (right side of image) which is the relational data in the FileMaker database. It's a basic relationship using the EmployeeID and Email to match records on both sides. The left side data consists of users who have registered on the website (WordPress). The right side is the FileMaker membership database used by the staff to maintain membership records. When this script runs, it goes through all the records on the left (basic…

  28. Howdy all: I want to enable users (using WebDirect) to enter their e-mail addresses in a field where when they click a button, the found set is is formatted as an Excel document and is then e-mailed to them from our FM Server (v21.0.2.202.) I know that the script has to run PSoS, so it's cued for that; the attached is a .pdf of how I have the script coded thus far; the e-mail is sent as instructed, but there isn't an attachment...so where did I muff it with setting up the (virtual) document to be included as an attachment? Cheers, Rich Export.pdf

  29. Started by dysong3,

    I am trying to create a script that checks if certain fields are empty. Can someone show me how to correct this script step that gives false positives? Testing this with Data Viewer gives the correct "0" if I terminate the script at (CONFIGURATION::Market_On_Close indication) but gives false negatives (1) if I terminate it at (CONFIGURATION::Quantity or later. I am testing this on records where all the fields have data. Is there a better way of doing this? IsEmpty (CONFIGURATION::Bar Interval) or (CONFIGURATION::Currency) or (CONFIGURATION::Exchange) or (CONFIGURATION::Market_On_Close indication) or (CONFIGURATION::Quantity or (CONFIGURATION::Security Typ…

  30. Greets, all: Kudos to Matt at ISO FileMaker Magazine for creating an easy-to-use solution for duplicating parent/child records. (I've touched it up for my use so it's slightly different from the original.) I'm having a royal brain hernia trying to figure out how step 46 in the Duplicate Invoice (id) script creates a new (child) record--I'd appreciate an easy-to-understand explanation of how that works. I know one can create a new child record using a portal where if you enter data into a field it creates a new child record, but am I to understand that as long as there is a relationship between two tables--and the "Allow creation of records in this table vi…

  31. Started by Dr. Evil,

    Hi Friends!.. looking for help on modifying my "Login" script. My loginScript navigates to login layout where User can login as different user, or quit the particular solution. Would like to close all windows that are not the login window. User may often have multiple solutions running, so i need to be careful not to close all of them, only the solution they are logging in/out/off of. Some of the web searchings on this topic I found are 10+ years old, and also use a loop. Not scared of loops, but wanted to check here for any tips/tricks before implementing so maybe i can avoid endless loops issues, etc... start out on the right foot before entering the weeds, lo…

  32. Hello, I want to be able to read and write to the EXIF tag -imagedescrption in JPG files stored in a container by reference from within FM. It looks like FM natively supports only reading the data from a few tags - like filename, make, model, ... the options in GetContainerAttribute. I see a few plugin options - Trio, MBS (MonkeyBread), MediaManager but cant' tell easily from the documentation whether they can do this. There are other references in this FM plugin list but many seem stale. I've used Phil Harvey's EXIFTools some so maybe I could make use of that from within FM somehow? Has anybody done this in a while who can lead me to the best solution. Not…

  33. Hi, I'm using Jens Teich's XML to FMP (Drag n'Drop), which includes its own "Universal XSLT" to import XML. The resulting fields are named path, parent, node, value, and type. The XML file can hold information from 1, 2, 3, 4 or more Medical Records. I've added a calculation to capture each Medical Record Number - MRN (Case ( path = "MCCI_IN200100UV01/PORR_IN049016UV/controlActProcess/subject/investigationEvent/component/adverseEventAssessment/subject1/primaryRole/player1/asIdentifiedEntity/id/" and parent = "id" and node = "extension" and type = "Attribute" ; value ; "" ) to find the relevant value and send it to the Summary field. The problem I have …

  34. In the UX part of a webdirect solution I would have a container field, where if I drop a .csv file onto it, would have the file processed as a dialog free import to an internal table, as a goal for this solution. The nature of webdirect makes this process, a bit different pathwise ... and similar to PSOS'ing, if container fields are used, however this might be done with two container fields one being stored inside the file, and the other one being referenced - because the entry of a referenced container, creates a folder where the dropped file resides for further handling. Is this the way to deal with this, or could the .csv-file be inserted into a large textfie…

  35. Hello! I have a database in Filemaker Pro 19 that is used by over 3,500 people, each with a login (e.g., 071111). Due to the high number of users, I struggle to keep the scripts updated because they are manual. When there are registrations from multiple people, I have to go through each one manually to make the changes. I thought about creating automatic scripts where a user with account number 071111 logs in and wants to see which courses they are enrolled in. Is there a way to take the account number and automatically search to see which courses they are enrolled in, then direct them to a specific layout? This would greatly simplify my work. Thank you for…

  36. I have a script to import files into a table which I would like to automate thru filmmaker script schedules I setup the schedule and it runs as it should but it fails, so I tried to run script on server thru filemaker pro but it also failed so I simplified the script to 2 lines which also failed. When the script is ran locally it works fine but not on Server it returns error 100 which indicates file not found. The files are located on the C drive of the server under a folder called Dealersocket, after several attempts using direct, network, and variable paths and online research no matter what I try I can't get it to work properly. I'm hoping someone can assist me. …

  37. Is there a way, even if it requires a plug-in, to get some more advanced features in the script editor. Specifically I really miss search and replace (or even just search!) and a horizontal (or vertical) split window to edit more efficiently. While I get that it's not a text editor, these features are so useful you'd think someone would have implemented them. Thanks.

  38. Hi, I'm running bBox_Shell commands (from Beezwax plug-in https://www.beezwax.net/products/bbox/wiki/main) which is running on a FileMaker Server 17 (with Perform Script on Server). bBox_Shell itself runs fine, but whenever I try to do a sudo to another user, bBox_shell returns a question mark "?" instead of the expected result (see examples below). The exact same shell commands run perfectly fine in an interactive shell. In order for sudo to work for the fmserver user, I added the following to the sudoers file: Defaults:fmserver targetpw, timestamp_timeout=0, passwd_tries=1 Host_Alias FMSHOST = mms.local fmserver ALL = (ALL) ALL fmserver FMSHOST = (A…

  39. Started by Søren Dyhr,

    In another thread have I stumbled over something which I probably could pull off via Applescript, but it's lack of being cross-platform'ish makes me wonder if I'm forgetting something? I could not say if the scale of records would allow me to transfere a copy the field in question to a specific sort field - in which the sorting then is performed in? BTW the first part of this script, is greatly inspired by this thread: https://community.claris.com/en/s/question/0D53w000057xdMHCAY/can-set-field-by-name-be-used-with-repeating-fields Thanks for this to Michael (Comment) and Alex Zueiv ...! TestofUX.fmp12

  40. In a data table ("MASTER"), there are two three fields. These are: Key Text (with a variable number of words) Count (the number of words in Text; note these are different in different records) In a different data table ("PORTAL RECORDS")I wish to create a new record for each word in the MASTER text field. I created a layout with the three MASTER fields and a portal showing PORTAL RECORDS. PORTAL RECORDS has two fields: a key field (Key) and a text field (Word). They are linked by the Key field. This script will go into the portal, create a new record, and set the word from Text that corresponds to the particular portal r…

  41. Hello, I have a typical row/column portal with labels as column headers. I want to be able to click on a column header (a text grouped button) and pass the associated field name to a script that then sorts by that field. I don't see a "Sort Records" or Sort Records by Field" that supports a variable name for the field. I notice that Sort Records by Field will use the currently active field if no field is provided - but I can't figure out how to "activate" the field using a variable. I tried "Go To Object" where the variable is the Object name but I get an error [3] Command is unavailable. This seems like it should be easy and I can brute force it with a case ty…

  42. Hi, I currently have a FileMaker file loaded onto Server 19. The file has an ESS connection to a MySQL server at a different host. I need to delete all of the records in the MySQL database once a week and upload fresh data via the FM Server. I got it to work on the server using a FileMaker layout and the Delete All Records script step. I'd like to speed up the deletion of the files on MySQL server via the ESS connection. I have tried to use the ExecuteSQL script step with DELETE FROM mytable, but nothing happens. I also notice that when I try to specify the ODBC Data Source, it is empty and I can't add anything, although the Filemaker files has two connections. What …

  43. Hi everyone, I'm currently running a CSV export from FileMaker using the Write To Datafile script step. The data is exported and then uploaded to MailChimp via Make.com. It works great, unless a comma is entered into a FileMaker field, which breaks the CSV structure. I'd prefer not to add much data entry validation on the fields (there are 20) and just run a script right before the export and replace any commas. I'm using a Quickfind on a specific layout to find all the commas in the databse (about 2,000 records), and it does the job. Is there a way to go directly to the field that has the comma? I don't want to do this: Any suggestion…

  44. Started by Steven Thompson,

    Looking for script to parse Domain Name (content between "//" and "/" of full URL). Ideal would be to add script to existing script (pastes full URL). Parsed content to be pasted info field "Domain." I'm a new member. Already searched the forum for "domain parser" and came up empty (surprisingly). Resources found through Yahoo search didn't work. Thanks in advance.

  45. Hi, An "Insert from URL" script populates a field with PubMed XML. I can confirm that the XML is imported in its entirety. Multiple XSLT were written to handle the correct import of the XML into tables and their corresponding fields (the PubMed Horcrux described a few years back). Testing the XSLT from the Menu File/Import Records/XML Data Source, the import proceeds fine, although it takes about 15-20 seconds for the spinning beach ball to disappear and FileMaker to progress with the XSLT/XML import. Don't know why there is this initial delay. Currently, I have placed the XSLTs into Containers (Global) fields. When I run a new script to process the PubMed …

  46. Started by Stu1019,

    Cant figure out why this does not work to duplicate a set of found records? go to record / Request first Loop Duplicate Record/Request Go to record/Request/Page [Next;Exit after last:on] End Loop After it duplicated the first record it quits..... I know its simple but it escapes me.. Any help would be apreciated Thanks

  47. Hi All I have what should be a simple issue but what I am doing does not work Scenario I have an Invoices database with a button to create a new Invoice. Creating a new Invoice increments the Invoice number by one Problem Sometimes a new Invoice is created by mistake so the Invoice has to be deleted and then the user needs to manage the database, find the invoice number field and manually decrease the number by one. So I would like to automate this task Solutions tried I have created a simple one line script to decrease the value of the auto entered field serial number with odd (& incorrect) results. I hav…

  48. Hi, In a FileMaker Server Scheduled Script (SSS), I am trying to execute script steps on a table from another FileMaker Database hosted on a remote machine (see also here). The remote file/databse is of course password protected and in Manage Security, I have allowed to store the user credentials. The remote table is defined as a table occurence in the local Relationships graph. When I run the script locally in my FileMaker Pro client, during the first script execution, I am asked to type in username and password. From then on, the credentials are stored and the script runs without user interaction. However, running the same script as a SSS there is no way …

  49. Howdy! I am using "Write to data file" in FM19 to add a row of titles to an existing csv file and am running into an issue where part of the first row of data is being removed. I have tried toggling the UTF setting and the append option on and off to no avail. Most examples that I find for Write to data file seem to be for creating files, not adding to them. Thanks in advance for any insight!

  50. Howdy, howdy: I must be missing something: I have a script step (Print) that prints an invoice after it's generated by a customer--using FileMaker Pro (v20.x), the script functions fine, but when creating the invoice using WebDirect, there's no printout. I know there's a caveat in Print's help documentation about WebDirect, but I'm not trying to print an invoice or create a PDF using a browser--I just want the invoice to print using an in-house, networked printer. I tried using PSoS, but it didn't work. Any ideas? Cheers, Rich

  51. Started by Gismo1233,

    Hi all, Please could you assist? I need to setup a script to send a mail to multiple recipients but only certain recipients must be selected from my user table How do I accomplish this?

  52. Hi, I have this script: ------------ If [ $$RecordClean [Child::ChildID] ] Revert Record/Request [With dialog: Off ] Set Variable [ $$RecordClean [Child::ChildID] ; Value: "" ] Else Set Field [Child::Value ; TextStyleRemove(Child::Value; If(Get(SystemPlatform) = 3; Bold; HighlightYellow) ) ] End If Exit Script [ Text Result: ] ------------ It's working correctly on the text field (Child::Value) of the first ChildID, but the search term stays selected from a previous search on the text field (Child::Value) of the remaining ChildIDs. TextStyleRemove should loop using the ParentID to perform the TextStyleRemove on ChildI…

  53. Hello. Sorry – crap at scripting. I have an FMP container field pointing to an mp4 file – well, a stack of them. I have a field that contains the path to each file. I have a button to open the file in its native app quite successfully. I would like a script that instead of opening the file simply reveals it in the finder. I've run the gamut of bad (AppleScript) syntax through damaged libraries and I'm sweating. Any help appreciated. Thanks a lot! Typical path: m3 ssd:Users:xxxxxxxx:Movies:music vids:Wild Thing.mp4

  54. Howdy, howdy: I don't know how to pull this off: We have an ordering database (using WebDirect) where customers place their orders; currently, I have it set up so the window (in List view) auto-refreshes every "x" seconds using the Install OnTimerScript script step. The problem is, if one of our people is in looking at a record when the auto-refresh hits, she's dumped out of the record. (Comment, you warned me about that.) The way she wants it to work is that the window auto refreshes immediately after each new order (record) is filed/created, but she doesn't want to get dumped out of the record of an order she's looking at. How can I pull this off? I imagine it…

  55. I have several scripts throughout my solution(s) that incorporate a Send Mail (Send via SMTP Server) step. The email credentials, subject, recipient, and message body are individually added in each individual script. We recently changed email providers, and are now using O365. As such, I've discovered two issues...(1) it's a pain to go through each script and update the SMTP settings for the new provider. (2) MS is more finicky than my previous provider (as it relates to security), so I have to be careful with application specific passwords, etc. I have a related file named dBase Common, which is accessible from my various tables/files, so I started to create a c…

  56. Hi, I'm working on a small project. I'm having a hard time creating a script, which takes the value in years between two dates (2022-2026 = 4 years) from the result (4 years) through a script I should be able to create 4 records and each record must have the respective year (2023, 2024, 2025, 2026) Thanks for your help

  57. Hi, I have a small project but can't get my head around it. Let's say I have 3 records with one text field and an auto generated serial number. For example record 1 has field = A and serial number = 1, record 2 has field = B and serial number = 2 and the third is C and 3. How can I make a printout that would generate a single blob that looks like A1;B2;C3 all attached together in the shortest possible form? Thanks Luc

  58. Started by Tim Stoner,

    Hi All I would appreciate any help At present I have a container field that holds PDF and the script attached opens the PDF all working well But I would like the container to hold either PDF or EML file How would I write the script to open either of the files in the container (not just PDF) I have an EMLviewer installed Many thanks for any help Tim open pdf from container.pdf

  59. Howdy, howdy... I'm curious why this simple script won't run via PSoS; the script works fine when fired from a client machine. I have the "Show compatible script steps by product" set to Server--none of the steps are flagged to cause any grief, so...? On edit: When manually triggered while in the Admin Server Console ("Run Now"), it "succeeds" but doesn't while viewing the file on a client machine. TIA in advance for your comments. FMS Script.pdf

  60. Started by human,

    I have a table with 160K rows. For the purposes here, say each row has a jobID, a trackID (a music track), and a status ID (1 = clear, 2 = sold, etc). I am trying to convert that table to a join table which would associate each unique jobID to a unique trackID (I need to do this in order to exchange data with an external system that expects a join table, and over which I don't really have any control). The problem I'm running into is that the "flat" table can contain a row where the jobID and trackID match another row, but the status is different between the two rows. In that case, whichever row has the higher status is the one that should be written to the join table. Se…

  61. Started by Rich S,

    Greetings, all: Currently, we have a script that imports Gmails for processing but it has a really annoying "limitation"--it's an all-or-nothing proposition so it imports all of the e-mails from the mailbox; there are many thousands of them, so it takes hours to download them all into a FileMaker database...whereupon I parse the ones I need and delete the rest. Ugh. Huge waste of time and resources. I'm just wondering if there's a way for FileMaker Pro to interact with Gmail so it "grabs" only the ones I want directly from the mail server; ideally, a script would run daily (via PSoS) to download that day's e-mails. Another possibility is to create a rule within …

  62. Started by human,

    I sometimes need to loop through thousands of records and perform lengthy calcs on each record, so this operation can take hours or even days to complete. I use freeze window so as to not slow down the operation, but is there a way to display a continuous loop counter or progress bar?

  63. Started by saghira,

    I have one table name "payment" ' , any have two layouts , "PAY" and "Wait" on table there is drop down field named "Status" , which have two values "Pay" and "wait" . I want when I change status "Wait" to Pay it shows on "pay layout " and in "wait layout " shows only record with status "wait".

  64. Hi All, Probably a no go - but what I want to do is insert "*S" into a find request via a script - but keep the "s. So all of this →"*S"← is input via the script. Of course, when I script it: Set Field ""*S"" then it thinks it's inputing "" & *S & "" which doesn't work. Is there a way to do this? Thanks for any tips

  65. I have an InstalledApp table that contains a list of apps installed on student iPads. I have an ApprovedApp table, which is a list of all apps that have been approved by the administration. I need for InstalledApp::appUnapproved to be populated with “Unapproved” in every record where InstalledApp::appName does not occur in the ApprovedApp table. I can probably script this with nested loops, but wonder if a calculation guru can suggest a more efficient method. Thanks.

  66. Hello all, I have a script problem that I am hoping to get some assistance with. The issue is: A Script that is returning a “[101] Record is missing” error. See layout “UNIT OF MEASURE TYPE” for notes on the layout itself. File attached. Any help appreciated. Thanks! script_error_101.fmp12

  67. Started by Rich S,

    Howdy howdy... Quick question: Is it possible to assign a global variable as a name in the Perform Script command, e.g., Perform Script [Specified: By name: $$_Blivet ; Parameter: ] ? I don't see anything in the documentation ( https://fmhelp.filemaker.com/help/16/fmp/en/index.html#page/FMP_Help/perform-script.html ) about it and I couldn't get it to work as is or with using Evaluate ($$_Blivet) either, so is it "do-able" or no? Cheers, Rich

  68. Hi all, I have a Pop Up Menu attached to a field where a User selects an value from a related table. This works just fine. However, I have a situation where I need to clear the value of some other fields if a User CHANGES their original selection in this Pop Up Menu. I thought the best way to handle this would be to create a script that goes through each field that needs to be cleared-out by using a set field script step with a value of "" - to clear them. Then attached the Pop Up Menu field with a script trigger that activates the script just described. This script attached using "onObjectModify" script trigger works partially, but not completely. If …

  69. I know that this will be very simple, but I am simpler yet! I have a contact database and I want to write a script that looks to see where different contacts are located and selects them if they are from either of 2 of 5 different possible options, in this case NORTH METROPOLITAN and SOUTH METROPOLITAN. If I make a script with two Perform find steps, it finds the North ones first, then looks for the South, but because it has already found the North ones, there are now no South ones in that list, so I know I need to join these perform find steps in to one, but do not know how. Any help greatly appreciated, Craig

  70. Howdy howdy: Yes, I know it needs to be done using PSoS as a subscript and have the BE plugin installed, but I must be missing a crucial step in the process or I'm just plain messing up. For attachments, I used $_ExportFile and $_FilePath_export together and separately (as attachments), but no dice: the e-mail is sent without any data or attachment. If I move the Send Mail step back to the "parent" script so it fires after the jump to the subscript, all the field data populates as it should but no attachment. I've thrown all caution to the wind as we're running FMS v20 and FMP v20 clients. I'm just a digital daredevil. TIA for your help! Untitled_Re…

  71. I have a script in my database to find and delete duplicate records based on a single field. Does anyone have a script to handle the possibility that the duplicate record occurs more just one time?

  72. Hi all, I'm working on a simple import from CSV script, and the issue I'm running into is in trying to show only my just-imported records as the found set so that I can perform some other operations on them. Normally when I import records manually, FM will omit all current records and import my new file... the just-imported records will be my found set. Performing this operation within a script seems to be different? It seems to omit the omit step – when I perform my Import Records all previously shown records are still shown. If I add "Show All Records" and "Show Omitted Only", when I then perform my import those records then become omitted and I now …

  73. I have 63,000+ email files (file extension: .eml) in a folder on my Mac ( filemac:/Macintosh HD/Users/onemac/Documents/emails ). I want to import each of these .eml files into a container field ( field name: Email_Container ). What is the best way to handle this? I’m wanting a separate record for each email. Regarding the container field contents, I’m wanting to "Store only a reference to the file." It appears that I need to use Insert File (not Import Records) because I’ll need to later use GetContainerAttribute to pullout the file name for parsing purposes ... When I use Import Records for these .eml files, the GetContainerAttribute does not work. However, if I use Ins…

  74. Greetings all: I want WebDirect users to be able to copy a .pdf from an existing record into another, but it being WebDirect nothing's easy so I installed the Base Elements plug-in (FMS v19.x) and scavenged some code to create a temporary export path of the existing container contents; this is the subscript which is PSoS: Set Variable [ $_PathPDF ; Value: "file:" & Get ( DocumentsPath ) & COPY::PDF_Filename__lxt ] Set Variable [ $_PathPDF_export ; Value:ConvertFromFileMakerPath ( $_PathPDF ; WinPath ) ] Set Variable [ $_exportPDF: Value: BE_ExportFieldContents ( COPY::PDF__lxr ; $_PathPDF_export )] Where I'm stuck is the subsequen…

  75. Started by Tpaairman,

    Disregard the post. I found my problem. Simple step missed.

  76. I've coded a script (attached) that successfully sends a scripted e-mail (from FM Server v19.x) that includes a .pdf as an attachment, but I'm just wondering if there's been any progress in being able to send multiple .pdfs in the same/one e-mail without resorting to having to use a plug-in; the threads I've been reading here and elsewhere stem from 2016, so if there's been any progress since then to being able to send such e-mails without using plug-ins I'd appreciate being pointed in the right direction. Happy holidays, Rich Email Script_Redacted.pdf

  77. Started by Columbo,

    I am new to FMPA 18 and trying to find out if a name already exists in the database and I don’t know if I can explain this clearly but,... The idea is that I have a button that runs a script to add a new record which is simply: 1 New Record/Request 2 Go To Field [PrehistoricLife::Name] //Sets the focus in the Name field Then a name is entered into the Name field and when <TAB> is pressed to go to the next field, (exits the Name field), it runs another script that searches the database based on the name that was entered into the name field to see if it already exists. I set the Name field trigger to OnObjectExit, figuring…

  78. Started by CCBtx,

    Does anyone know of a strategy to capture the user password on FM server? ..before you jump on this topic for being a bad idea.... I am trying to sort out a way to keep the user's Windows password sync'd with their FM password. The environment is that they access FM via webdirect and then access iis via browser only. My thought is that if I force a password change on FM... then I can sync that on iis... because, with browser only access... I do not see any other way.

  79. I have a Keyboard Maestro macro called “Clipboard to BBEdit” which opens a new BBEdit document and pastes the contents of the Clipboard. I call this macro from a number of contexts, including FileMaker. Here’s the FileMaker script. Copy [ Select ; Note::noteContent ] Perform AppleScript [ “tell application “Keyboard Maestro Engine” do script “Clipboard to BBEdit” end tell” ] If I manually copy the field, and manually trigger the macro outside of FileMaker, the macro executes instantly. But if I trigger it from within FileMaker, it takes over twenty seconds. My other scripts are performing normally. But anything that runs AppleScript lags badly. I’m stumped. Ca…

  80. I need help writing (or obtaining) a script that will, with a click of a button, take the user to a folder in the finder. I'm using FileMaker Pro 17 on a Mac. I'm also illiterate when it comes to scripting. I know what I want it to do but I don't know how to do it. Some background: The database I'm working with holds information and a video clip. I use it to quickly search keywords and to see the video clips in the results. What I'd like to have is a button next to the "VIRIN" number (field 2 from top left) that will take me to the folder that contains the original video clip. These clips are stored on an external SAN. The path will be the same for each group of…

  81. HNY, everybody! I found this thread ( https://community.claris.com/en/s/question/0D50H00006dslGcSAI/global-fields-global-variables-multiuser?t=1672849179399 ) that provides basic info about using global variables in a hosted database (FM Server v19, WebDirect), but I need a little extra help understanding a concept. If a solution is accessible to many WebDirect users using a single Account name (Guest) and multiple users are signed in concurrently, are global variables subject to being overwritten by subsequent execution of scripts or are global variables "owned" by each user (per session) so their content is immune from "interference" from other users even when…

  82. Started by rick altman,

    If this script works for moving to my next layout: Go to Layout [Get (LayoutNumber) + 1 How come substituting " - 1 " does not work for moving to the previous layout ??

    • 1 reply
    • 1.1k views
  83. Happy holiday season, everybody. We have an ordering system for die-cut letters and I'd like to be able to parse out how many of each letter is used in a phrase into two separate fields (CharacterUsed and Count) so we can bill for the quantity of letter used, e.g., If someone types into the phrase field, Happy Birthday, Fred, the result of the script/calculation would be: a 2 B 1 d 2 ... y 2 ...where each record would be created in another table for each character used (and the quantity of each letter used.) I know the slow way would be to use a looping script using PatternCount for each character, but I'm wondering if there's a mor…

  84. Started by Jeffrey Bloch,

    I have a script which includes a step: PERFORM SCRIPT ON SERVER. The script (being performed on the server) has a line PERFORM SCRIPT. The questions are: Does this 'second' script also run on the server (because it was called from the server) or back on the user's system? Do variables set in the initial SERVER script remain populated for the second? Thanks

  85. Started by cathay_steven,

    Hi , I am beginner with the script workspace , hope someone can help me to explain on this . I had attach the image . you can see the highlight in the image command , how can i remove this // command ?

  86. Started by Jeffrey Bloch,

    I sent the following sentence through Google Translation API (english -> french) and the response substituted certain characters for HTML (I think). I played around with DECODE options to return the code to the actual characters I need, but haven't yet found the solution. Sent: the woman yelled at the man Received: la femme a crié à l&#39;homme Full response: { "data": { "translations": [ { "translatedText": "la femme a crié à l&#39;homme" } ] } } Thanks

  87. Started by Jeffrey Bloch,

    Is there a limit to the number of scripts that can run simultaneously on a server launched from a single application (not requiring completion)? Assuming that a script requires 10 seconds to run, what would happen if 10 of these scripts are launched simultaneously to be run on the server?

  88. Started by Enigma20xx,

    Giving two dates from different years, I`d like to populate a child table with one record for each year (not each 365 days) but year “number‟, counting then, the days of each year. Let`s say: Parent table. start_date 10/21/2020 end_date, 02/15/2022 Total days: 483 -I got this solved-. I know I have to make a script to populate the child table, but I don`t know how to “extract/count‟ that are 3 different years in the dates given and count their days. Child table (3 records). 72 days, year 2020 365 days, year 2021 46 days, year 2022 As always, I appreciate any advise.

  89. Started by Ronan,

    Hi I have a simple database. It has an Invoice and contacts tables. Contacts has a name_full field which combines first and last names. The tables are related using a unique key. When you create a new invoice and start typing in the name field, I want it to autofill dynamically as you type using data from the name_full field from the contacts table. Any help is greatly appreciated!

  90. Started by mhemans,

    Need a little help with this script. I have two date fields. One enters the date once another fields is marked as reviewed. The other pulls in the last date from a report via a portal. As things get revised via the portal, I wanted previous fields to be reviewed based on the fact that there was a revision created. So I have if the date revised > than the date reviewed. If true, then I want it to clear a couple of fields so that I know that I need to review it again. The script as is, is not working. I am clearly missing something and the answer is probably sitting right in front of me. Any help would be great.

  91. Hi, this is not exactly my application but mimics the structure of what I am trying to do. Imagine a chessboard, with each record in a squares table specifying in separate fields the row, column and chess piece (if any) filling it. In each record (for each square) I also want to list all the chess pieces that can reach that square in one move. To do that, for each square X, I want to look at each other square, see what piece is in it if any, and then calculate whether the piece can reach square X, and then enter data in square X's record indicating that that kind of piece can reach square X. That kind of thing would be pretty easy to do in C using a for-loop, bu…

  92. I am not even sure if scripts is the right way to go, but here is my question. We have a huge database with questions that were asked. Each user has, lets a social security number. We want to put all of their answers together in different columns. So there are about 20 different questions that need to be pull out of that data per person, and then put into a report, or another table so we can view all of the users, vertical, and all of their answers to the questions, horizontally(the columns names). How is this possible? example: One table has all of the names in it with their SS#. Each question has their Name and SS#, so the SS# could be th…

  93. We're running FM Server 19.5.1.43 with a hosted file that I set up to run as a scheduled script that would send e-mails to people notifying them that their certificate or license needs renewing. However, it fails every time it runs. As a troubleshooting step, I disabled all the script steps, created a new one with a Perform Find on CertExpiration__lxd field (with * as the operator), and attempted to run the script again from the server. It failed again. According to the Help documentation, Perform Find should execute without problems but upon looking at Enter Find Mode in Help, it's only partially supported by the server; it doesn't say why it's only partially suppo…

  94. Started by Ian Slater,

    one other question, I have a file name say 40.10.pdf or 40A.10.pdf How can I pad and show the value to the left of the decimal? The result I am looking for is: 00040 and 0040A Tried functions right and left and but can't figure it out

    • 2 replies
    • 888 views
  95. I am trying to set up a recurring import from a file downloaded each day. Windows adds (1) or (2) etc as a suffix to each file with the same name and therefore, my filename used in the recurring import fails. I am hoping that the end user does not have to change the way they do things on their computer. They should just click the daily update on the site they are using download the file. Then i have filemaker do its magic and import the file. any suggestions to overcome this. p.s I hope this is not a redo of a previous topic. I could not figure out a good search term(s) for this. Dave

  96. Morning all! On several mornings over the last month, had to reboot our FMS 19 server after it got bogged down in some locking conflicts. My investigation has concluded the following, with 90% certainty ... First lock record in TopCallStats is on a table that is never edited. It's a history table where we store audit records. The script called simply creates a new record, sets a half dozen fields, commits the record, and goes on it's way. TCS log shows "Commit Records (Lock Conflict)". Soon other functions are tangled up because of it and it just snowballs until the system becomes unusable. The system won't let go of the commit. That function is performed on an …

  97. Started by Ian Slater,

    using FMP for a long time, but I am a rank amateur. I have a DB of a TV script pdf . on each page there is a page number and the individual scene numbers. It has a page number field and a portal to put the scene numbers in text on the page. The portal is from a table that has 2 fields, the scene numbers and the page number. the page number is used to create the relationship. I want to create a script or calculation for when a scene number is typed in, the tv script goes to the page with that scene on it. the steps are 1. on the script page type the scene number you want to go to 2. that input would be used to go to the 2 field table an…

  98. Started by peter100,

    For years I've been using scripts to make emails from a record to my default mail client. Today suddenly that stopped working for no apparent reason. I've attached a screenshot of the error-message which is in Dutch but says something like: "Some required files have been damaged of are not installed. Run the installation program to fix this problem." I did already run the installation program for FMP 19.4 but the problem remains the same. Hope someone recognizes this problem and is able to help. Thanks, Peter

  99. Assignment: to copy 'work order' records per customer to save the customer time. I have two related tables . The customer table has customer details. The other table has all the 'work orders'. I have pulled in the 'work orders' into the customer as a portal. I have created a button to duplicate one record. See attached script. QUESTION: how to copy all records per customer. I have workorderID / customernumber id.

  100. Hi, 👋 This question is about insert PIcture or scripting. I need to insert images of office buildings to corresponding 'office' table. The images are on the desktop. What is the simplest way to upload many images to respective record. I have the customer number and/or image field. option 1: create table / container field / customer number - upload images THEN create a relationship between the customer table and the image table option 2: write a script to upload it to the layout and image container field. Any suggestions. Any tips. please instruct with step by step instructions if possible. Thanks a million.

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.