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

Filemaker won't Calculate Fields unless drop down used

Featured Replies

I have a lot of tables to fill, and I don't want to use a drop down menu to reselect all 3000 entries. Is there a better method to do this? I originally tried lookup but it refused to accept input, then I changed it to drop down, but now It won't auto lookup entries. Is there a way to force this behavior?

 

I have a lot of tables to fill, and I don't want to use a drop down menu to reselect all 3000 entries

What does “fill tables” mean​? And what “reselect”? And why does the title say “calculate fields”?

Edited by eos

  • Author

the field isn't defined as a lookup, so Filemaker doesn't want to look it up with relookup. When I define the field with a drop down value list, it refuses to update until i reselect the current text

I think the problem may be that i am using vlookup instead of the standard lookup option, but then i can't get the right information either..

 

I think the problem may be that i am using vlookup instead of the standard lookup option, but then i can't get the right information either..

​I think the problem is that you're not explaining clearly what the problem is. For example, I have no idea what you mean by "using vlookup instead of the standard lookup option". There is no "vlookup" in Filemaker.

Additionally, there is ambiguity about what you (ylibber) mean by "define a field with a dropdown value list".

Defining a field is done in field definitions, in manage database. You cannot specify interface control styles when defining fields.

That is done at the layout level.

  • Author

vlookup is a custom function, that behaves like a vertical lookup from Excel. When i use a drop down list on a Text field, The fields it looks up does not get sent any input until i run the dropdown. the fields remain blank. even if they have text already in them.

which makes my job worse because now i have to perform those lookups externally when i import my data.

 

  • Author

This is what Vlookup does (

// Created 2014-02-03 by Doug Staubach  -- This file is version 1.0 -- http://www.briandunning.com/cf/1740
// Simulates the VLOOKUP function in Excel -- looks in a specific column for an exact match and if a match is found, returns the value from a different column on the same row (in the same table)
If (
     IsEmpty ( MatchingValueOrList ) ; ""                                                                                 //exit if there are no more items to process
     ;Let ([
            VAR1 = GetFieldName ( LookupTableNameAndFieldName )
           ;VAR2 = LeftValues ( MatchingValueOrList ; 1)                                                          // you can lookup a single value, or a list of values
           ;VAR2 = If ( Right ( VAR2 ; 1 ) = "¶" ; Left ( VAR2 ; Length ( VAR2 ) - 1 ) ; VAR2 )      // gets rid of the trailing "¶" character
           ;VAR3 = GetFieldName ( ReturnFieldName )
           // -------
           ;FLD1 = "\"" & GetValue ( Substitute ( VAR1 ; "::" ; "¶" ) ; 2 ) & "\""                             // get the first field's current name and format it for SQL-safe processing
           ;FLD2 = "\"" & GetValue ( Substitute ( VAR3 ; "::" ; "¶" ) ; 2 ) & "\""                             // get the second field current name and format it for SQL-safe processing
           ;TBL1 = "\"" & GetValue ( Substitute ( VAR1 ; "::" ; "¶" ) ; 1 ) & "\""                             // get the TABLE name and format it for SQL-safe processing
           ;TYP1 = MiddleWords ( FieldType ( Get ( FileName) ; VAR1 ) ; 2 ; 1 )                          // get the lookup field's data type (Text, Number, Date, Time, Timestamp, or Container)                                    
           // -------
          ;MyCmd =
             "SELECT (" & FLD2 & ")" &
             " FROM " & TBL1 &
             Case (
                 TYP1 = "Text" ; " WHERE " & FLD1 & " = " & "('" & GetAsText ( VAR2 ) & "')"          // text has to be enclosed in single quotes
                ;TYP1 = "Number" ; " WHERE " & FLD1 & " = " & ( GetAsNumber ( VAR2 ) )            // numbers (and other types?) don't need quotes
              )                                                                                                                            // room for expansion here (need to add the other 4 types)
          ;VAR4 = ExecuteSQL ( MyCmd ; "" ; "" )
        ];
        If ( Trim ( VAR4 ) ≠ "?" ; Trim ( VAR4 ) ; "" )
     )
     & " " & Vlookup ( LookupTableNameAndFieldName ; RightValues ( MatchingValueOrList ; ValueCount ( MatchingValueOrList ) - 1) ; ReturnFieldName )   // recursion (move to next item and go again)
)
// Uses ExecuteSQL, but you don't have to know anything about SQL to use it
// Tested with FileMaker Pro v13 (this might also work with FileMaker Pro v12 -- main requirement is the ExecuteSQL function)
// Example1: VLookup ( TableInventory::ItemNumber ; "007¶626¶" ; "Description" ) = "Lamp¶Television¶"
// Example2: VLookup ( TableInventory::Description ; "Lamp" ; TableInventory:ItemNumber ) = "007¶"
// Example3: VLookup ( TableInventory::ItemNumber ; List ( TableInvoices:ProductsPurchased ) ; TableInventory:Description ) = "Cigar¶Rum¶Recliner¶"

when ever i have a field that uses this and the field referred to is for example , itemnumber, the script does NOT run if the Field it calls up, (itemnumber) is turned into a valuelist drop down. it only runs after the valuelist was selected by mouse

 

 

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.