Jump to content

Search the Community

Showing results for tags 'let'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type

Community Forums

  • The New FileMaker Platform
  • Community Resources
    • Community Articles, Tips, & Techniques
    • FileMaker Marketplace Discussions
  • FileMaker Platform
    • FileMaker Interface Features
    • FileMaker Schema & Logical Functions
    • FileMaker Go for iPad and iPhone
    • FileMaker and the Internet
    • FileMaker Pro Advanced 18
    • FileMaker Pro Advanced 17
    • Legacy FileMaker Platform Discussions
  • FileMaker Server Administration
    • FileMaker Server 18
    • Zabbix Server Monitoring
    • FileMaker Server 17
    • FileMaker Cloud
    • FileMaker Custom SSL Certificates
    • oAuth and External Server Authentication
  • Brain Food
    • Security Concepts
    • The Left Brain
    • Upgrading & Migration
    • Data Analysis
    • Development Standards
    • The Separation Model
    • Relational Database Theory
    • Damaged / Corrupt File Problems
    • Bar Codes (Printer, Scanners, Software)
    • Hardware & Networking
    • OS Level Database Automation
    • Product Ideas
  • JavaScript Integration
  • FMForums Affiliates & Sponsors
  • FileMaker Classifieds
  • FM Forums Operations
  • FileMaker Friday Night Chat's Topics


There are no results to display.

There are no results to display.


  • White Papers
  • Infographics
  • Samples
  • Solutions
  • FMGo
  • Plug-Ins
  • Tutorials

Product Groups

  • Workplace Innovation Platform
  • Site Advertising
  • Development & Hosting

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start







Website URL




OS Version

Found 7 results

  1. Hi, Charles Ross (Chuck) posted the following script in 2010 to split the contents of a text field into text chunks, using the last period (within a period count) as text chunk separator: Let( [ MaxString = Left( String; 100 ); // Get the first 100 characters of the original string. PeriodCount = PatternCount( MaxString; "." ); // Find out how many periods are in the substring. PeriodPos = Position( PeriodCount; "."; 1; PeriodCount ); // Get the position of the last period. Substring = Left( MaxString; PeriodPos ) ]; Substring ) I've only been able to get the first line to work with a given number of characters: Left ( String ; 1880 ) When I add the rest of the script there is no error message, yet nothing is recovered from the String. The second problem I have is: As the remaining text will not necessarily start at 1880, how do I calculate the recovery of the remaining text after the first text chunk is collected? Thanks very much beforehand, Daniel
  2. Hello all, still I did not fully understand how to implement recursion.... admittedly I am lost- and very much so: There is a list of values = list By script, I am looping through another list with keys. Now I would like to check if the key is in the list. First I was thinking to get the value with Position ( list ; key; 1; 1). The problem is that in list, there might be 4651 and key might be 6, which would make Position true. However 4651 is not 6. Hence, I thought to loop through list by recursion and to check with the "=" but I dont know how to build this: Let ( [ list = thelist; k = thekey counter = 1 c = valuecount (thelist) ]; Case ( counter > c ; ""; // this is my exit GetValue ( list; 1) = k ; 1; and here is am not getting the calc to recurse... My second thought was to turn 6 into 0006 and then use Position. However the Length of the keys might change and it seems not the right approach. Who could help a dummy, please.... thanks
  3. I am filtering a portal where one method works and other other does not. WORKS Case ( IsEmpty ( table::globalTextField ) ; db_payment::id > 0 ; PatternCount ( table::globalTextField ; "/" ) > 1 ; db_payment::date = GetAsDate ( table::globalTextField ) ; db_payment::invoice = table::globalTextField or PatternCount ( db_payment::reference ; table::globalTextField ) > 0 ) DOES NOT WORK line 1 and 2 of case work but not line 3 Let ( [ txt = GetAsText ( table::globalTextField ) ; num = GetAsNumber ( table::globalTextField ) ; dte = GetAsDate ( txt ) ; dt = PatternCount ( txt ; "/" ) > 1 ] ; Case ( IsEmpty ( txt ) ; db_payment::id > 0 ; dt = 1 ; db_payment::date = dte ; db_payment::invoice = num or PatternCount ( db_payment::reference ; txt ) > 0 ) ) I have simplified examples but ultimately I would prefer a Let function to allow for further options in my filter Portal_filter_with_Let_function.zip
  4. Hey all, some more videos added using the Let Function:
  5. Friends, I have had it for today... can't seem to get it right... I'm writing an Excel sheet using the MBS plugin. The plugin let's me set FORMATS so I can underline or center cells etc. For every FORMAT I declare a variabel i.e. that gets a value from the plugin $$Format1 = 89 $$Format2 = 90 I pull data from FMPro and 'filling' up an Excel Template with field values. Some of these field's need formatting. Since all data is dynamic, my script needs to handle this accordingly. I 'build' the excel sheet row-by-row, therefore pulling data from FMPro, row-by-row. A VARIABLE is handeling the data in the LOOP...The variable content looks like: "7" & "|" & "FM08_SAMPLE::ID_NUMERIC" & "|" & "FORMAT1" & "¶" & "8" & "|" & "FM08_SAMPLE::FM08_Sample_date" & "|" & "FORMAT2" & "¶" & "9" & "|" & "FM08_CUSTOMER::COMPANY_NAME" & "|" & "FORMAT1" In the script the data is pulled apart, set to the right CELL and a FORMAT needs to be applied. Now, here's my question, I need to have this function filled: MBS( "XL.Sheet.CellWriteText"; $$MBS; 0; ROW ;COLUMN; VALUE; FORMAT) Where format of course should not be "FORMAT1" but "89"... I tried things like: Let ( [ STRING = GetValue ( $$D ; $$Tel ); COLUMN = Middle ( STRING ; 1 ;Position ( STRING ; "|" ; 1 ; 1 )-1) ; WLENGTE = Position ( STRING ; "|" ; 1 ; 2 )- Position ( STRING ; "|" ; 1 ; 1 ) - 1; WAARDE = GetField (Middle ( STRING ; Position ( STRING ; "|" ; 1 ; 1 )+1 ; WLENGTE)); FORMAT = Middle ( STRING ; Position ( STRING ; "|" ; 1 ; 2 )+1 ; 10); VAR = "Let ( $$" & FORMAT & "; ")" ] ; MBS( "XL.Sheet.CellWriteText"; $$MBS; 0; $$R ;COLUMN; WAARDE; Evalueren(VAR) ) ) But It does not work... where do I go wrong?? Thanks, Jeroen
  6. Hello, for days I am trying to figure out how to do this- maybe it is easier then I think: on a multiuser enviroment all on fm pro 11, I would like to use a mix of the virtual list technique (bruce robertson?) with displaying related data for input through a portal. Anyhow what I would like to do is this: create a multiline key to display data that is filtered dynamically. the approach: parent connected to child via x cartesian list (fieldfromchildindexed) the field I am listing displays two fields in one line like so: categorykey||keychild The list will retrieve no more then 6k records max. Now what I would like to do is remove all the lines from the list that don't have a "selected" category in them then I would like to remove all the left (list (Position (list ; "||"; 1;1)-1 from the list, giving me a clean multiline key to set as the starting point for my portal to display. I read something like this but I cannot manipulate it properly. Can anybody please help? I am not good at recursive functions... The reason for doing this instead of a search and omit and getnthrecord values is my worry about speed for the users over wan. Thank you.
  7. As most people here probably know, the Let ( ) function can be used to define a Local variable. As such, it is possible to build a custom function that defines such a variable, and it is further possible to set said variable to a value including itself. An example would be the following custom function, ErrorList, consisting of the following calculation: Let ( $ErrorList = List ( $ErrorList ; Get ( LastError ) ) ; "" ) If a Set Variable script step sets the same variable as a custom function like the one above, e.g. Set Variable [ $ErrorList ; Value: ErrorList ] …the script step will run appropriately, so long as the contradictory variable—in this case, $ErrorList—is not yet defined. However, once this variable has been defined, executing the preceding script step will cause FileMaker 14 (and perhaps other versions) to suffer an Error #1213 and crash the application. The workaround for this behavior is to have the Set Variable script step set a dummy variable, e.g. Set Variable [ $x ; Value: ErrorList ] Even if $x is not referenced anywhere, having a script call the ErrorList function passes the variable $ErrorList to the script’s own context, thus allowing its value to be accessed by later steps in the same script (including subsequent calls to the ErrorList function itself). In FileMaker 15, this behavior has been changed: local variables defined within a custom function are now valid only within the scope of the function itself, including any recursions. While this alleviates the problem of application crashes, it also results in unexpected behavior when scripts written in earlier versions of FileMaker rely on custom functions to set local variables. When migrating to FileMaker 15, each affected script step must be updated to set the target variable explicitly instead of relying on the custom function to do the work. In other words, the code: Set Variable [ $ErrorList ; Value: ErrorList ] …which proved fatal in FileMaker 14, is now required grammar for FileMaker 15: FileMaker 15 believes that what happens in the function stays in the function, instead returning the result of the calculation to the variable defined in the Set Variable script step. The FileMaker 14 grammar, Set Variable [ $x ; Value: ErrorList ] …thus sets $x to the intended value of $ErrorList while leaving the value of $ErrorList as null. Unfortunately, this cannot work effectively in a mixed-installation environment: the FileMaker 14 grammar leaves FileMaker 15 clients with unintended null values; the FileMaker 15 grammar causes FileMaker 14 to crash. When upgrading all users to FileMaker 15 is not feasible, the best workaround is to use the FileMaker 14 grammar, then once all relevant script steps are complete, check the value of the intended variable (e.g. $ErrorList) and, if empty, set it to the value of the dummy variable (e.g. $x). ErrorTest.fmp12
  • Create New...

Important Information

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