Search the Community

Showing results for tags 'let'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Categories

  • Custom Function Library

Categories

  • Journal

Community Forums

  • Community Resources
    • FileMaker Pro 16 Discussions
    • FileMaker Pro 15 Discussions
    • Community Articles, Tips, & Techniques
    • FileMaker Marketplace Discussions
  • FileMaker Security Management
    • Security Concepts
    • Intellectual Property
  • FileMaker Server Administration
    • FileMaker Server 16
    • FileMaker Server 15
    • FileMaker Custom SSL Certificates
    • External Server Authentication
    • Stand by Server Deployment
    • Legacy FileMaker Server Discussions
  • FileMaker Platform
    • FileMaker Interface Features
    • FileMaker Schema & Logical Functions
    • FileMaker Go for iPhone & iPad
    • iBeacon Support
    • FileMaker IOS App SDK
    • FileMaker Discussions
    • Brain Food
  • FileMaker and the Internet
    • FileMaker Cloud
    • FileMaker WebDirect
    • Custom Web Publishing
    • Other Internet Technologies
  • Geist Interactive Product Support Forums
    • Visit Geist Interactive
    • Visit Modular FileMaker
    • FMPerception
    • Generator
    • fmQBO
  • 360 Works Official Product Support Forums
    • 360 Works General Support
    • MirrorSync by 360Works
    • SuperContainer by 360 Works
    • ScriptMaster by 360 Works
    • FTPeek by 360 Works
    • 360Works Email Plugin
    • DocuBin by 360 Works
    • Zulu – FileMaker, iCal & Google Calendar.
  • FM Forums Affiliate Sponsors
    • SyncServer Pro by LinearBlue
    • Open Source Frameworks
    • Monkey Bread Software (MBS Plugin)
    • FileMaker Plug-Ins
    • ISO FileMaker Magazine
    • User Group Central - Sponsored by FMPug.com
  • FM Starting Point - By Richard Carlton Consulting
    • Visit FM Starting Point
    • FM Starting Point - General Discussions
  • FileMaker Classifieds
    • FileMaker Product & Service Announcements
    • Professional FileMaker Training
    • Services for Hire
    • Services Wanted
    • Solutions Wanted
    • Tools Of The Trade
  • The Water Cooler
    • Member Lounge
    • Wants & Wishes
  • FM Forums Operations
    • FM Forums Feedback & Site News
    • Site Instructions

Blogs

  • Captain's Blog
  • FileMaker Weetbicks
  • FileMaker Security Blog
  • The FileMaker Rift
  • HOnza's Bits @ FMForums
  • SeedCode
  • CampSoftware, Hal Gumbert
  • FileMaker Hacks
  • Skeleton Key's Blog
  • Wing Forward Solutions
  • 360Works Articles and Tutorials
  • GoBillit
  • Filemaker - an amateur's view
  • Linear Blue
  • Surya Kanta Mekap's Blog
  • eXcelisys' Blog
  • Manjit Behera
  • Blue Feather's Blog
  • RCC's FileMaker News and Bits
  • Thorsen Consulting
  • DB Services Blog
  • FileMaker Magazine
  • Eye on FileMaker
  • Dev Talk
  • The Philosophy of FileMaker

Categories

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

Found 6 results

  1. 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
  2. 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
  3. 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
  4. 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.
  5. 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
  6. Hey all, some more videos added using the Let Function: