Jump to content

Search the Community

Showing results for tags 'variables'.



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 Security Management
    • Security Concepts
    • Intellectual Property
  • FileMaker Server Administration
    • FileMaker Server 17
    • FileMaker Server 16
    • FileMaker Cloud
    • FileMaker Custom SSL Certificates
    • oAuth and External Server Authentication
  • FileMaker Go & Mobile Strategies
    • FileMaker Go for iPhone & iPad
    • iBeacon Support
    • FileMaker IOS App SDK
  • FileMaker and the Internet
    • FileMaker DataAPI
    • FileMaker WebDirect
    • Custom Web Publishing
  • FileMaker Platform
    • FileMaker Pro Advanced 17
    • FileMaker Pro 16
    • Command Line Data Migration Tool
    • FileMaker Interface Features
    • FileMaker Schema & Logical Functions
    • Brain Food
    • Legacy FileMaker Platform Discussions
  • FMForums Affiliates & Sponsors
    • Productive Computing Support Forums
    • 360 Works Official Product Support Forums
    • Geist Interactive Product Support Forums
    • FileMaker Vendors
    • FileMaker Training Resources
  • FileMaker Classifieds
    • Announcements of FileMaker Product, Services or Resources
    • Classifieds
    • Tools Of The Trade
  • FM Forums Operations
    • FM Forums Feedback & Site News
    • Member Lounge
  • FileMaker Friday Night Chat's Topics

Blogs

There are no results to display.

There are no results to display.

Categories

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

Product Groups

  • Site Donations
  • Site Advertising

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Title


Industry


Location


Interests


Website URL


Skype


MSN


Yahoo


OS Version

Found 16 results

  1. I am trying to filter two variables but I can't make it work. Could someone point me what am I doing wrong? Thank you. Sample.zip
  2. I am trying to open my (local) FM 14 Pro file [which has an auto-exec "Import Script"] but the script needs a variable file name. How do I pass this variable file name into Filemaker at 1) the time of the file open or 2) at the time of running the script (if I switch to manual execution)? Is #1 by using the fmp:// syntax from a web browser external to FM? (or is that syntax just for use when invoked from INSIDE a FM file?)
  3. I am sure this is one of those simple ones… that has me bamboozled for nearly 2 days now. I need to limit access of my users viewing only a limited set of "Company" records after they log in. The companies that they are allowed to see are listed in each respective user's profile. My opening script goes to the user's profile and creates a global variable for each company that they are allowed to view. When I go to the "Manage Security > Edit Privilege Sets > Records > Custom Privileges > Limited > Script", and use any of those variables (e.g. $$Company01"), the records table returns no records at all (i.e. as if there were no matches). When I test the script and use text for any one (or several) of those companies by name (e.g. "ACME PTY LTD"), the access rules work perfectly. To be clear: The global variables themselves are correct. I know this this because they work in other scripts absolutely perfectly, so the variables DO match the names in the field. The script looks like this: $$Company = Table Manufacturer or $$Company01 = Table Manufacturer or $$Company02 = Table Manufacturer or $$Company03 = Table Manufacturer or $$Company04 = Table Manufacturer or $$Company05 = Table Manufacturer In every respect, the variable matches the actual text, but I can only imaging that there is a problem with my syntax? Please advise. Many thanks
  4. jsword

    Complex Subsummary Reporting

    Hello All! I am having trouble building a complex subsummary report efficiently for a real estate database. The report layout is simple: I basically have a layout with 18 columns, all years, 2000-2017. The layout only has subsummary parts, no body parts. The subsummary part I am using to display data is sorted by a field called Micromarket (basically a geographical area). I want to display the number of units built in each year for each Micromarket. I have the report working perfectly, but I had to add many fields to my property table to accomplish this. The fields are as follows: Field Name: Number_of_Units_2000: Calculation: If ( (Year_Built)=2000;Number_of_Units ) and a corresponding Summary field that is the "Total Of" Number_of_Units_2000. I have done this for each year on the report, so I have made 18 Calculation fields, and 18 corresponding Summary fields. I then put each Summary field in its corresponding column on the layout, and for each Micromarket, I am able to display the number of units added in a given year. Is there a more efficient way to do this? I have tried performing a different find for each year within a script, then populating a Merge Variable with the result, but the Merge Variable doesn't behave the same way on the layout as a Summary field does. Any help would be appreciated!
  5. Richmilnix

    Variables

    I'm reframing a question that I posted in a confusing way. Using variables seems so simple to me, but I know I'm missing something. I'll just post exactly what I'm trying to do so you guys can tell me why it isn't working. The project is a db that will handle shift schedules for employees. In the one-day view I'm looking at, the essential live field is a global date field called gDate_of_work. A portal is looking through to related records and returning a list of employees (from a table called staff_schedule_match), identified here by unique serials, who are scheduled to work that day. There is a second portal, located on the same layout, that is (correctly) showing a separate related list, of employees who are available to work on the day of the week. I, of course, want to be able to click on the name of an available employee and pass her serial number, along with the date in the global date field, to a new record in staff_schedule_match. In the distant past, I've sometimes solved this by opening layouts in offscreen windows and having extra fields dedicated to this data transaction, sometimes even by using the computer's clipboard (i.e. copy/paste). The script I'm trying to execute here goes: Set variable ($shift_add_nuid; employee's serial number from related record two) Set variable ($work_date; date displayed in this global date field) Freeze window Go to layout staff_schedule_match New Record Set Field (staff_schedule_match:nUID; $shift_add_nuid) Set Field (staff_schedule_match:StartDate; $work_date) Set Field (staff_schedule_match:EndDate; $work_date) Commit Record Go to layout (original) Refresh window Stepping through the script watching Data Viewer, I can see that the correct data is getting loaded into the variable values, but I can also see that the destination fields show up with an Unrelated table error. I don't understand why - I expected the behavior to be destination-agnostic, like my computer's clipboard, where if I copy some text in an email, I can paste it into a word processor or a browser or whatever.
  6. Hi All.. Not sure if this is the correct forum.. but here goes.. Is there a way to format insert merge variables with Dollar signs and 2 decimals. When I try to format this with the inspector telling it to use dollar sign and 2 decimal I just get the number without the Dollar sign or the decimal Thanks Stu
  7. Hi all, I need scripting assistance; I have a script that searches on a layout for records on current date and creates invoice records on the found set in a different layout. I would like like after creation of each invoice record, i define variables and open another file where there is another script that creates a new record in that file and sets the fields to the variables defined in the first file. is at all possible to reference variables in a subscript that are defined in the main script? NB:Main Script and Sub script both belong to different database files. This the contents of the main script...... #Script used to create Invoices that need to be paid daily. Set Error Capture [ On ] Go to Layout [ “Tour_List” (Tour_Storage) ] #Current Invoices found... Enter Find Mode [ ] Set Field [ Tour_Details_TimetableVehicle::lxd_Invoice_Date_Start; Get(CurrentDate) ] Perform Find [ ] Constrain Found Set [ Specified Find Requests: Omit Records; Criteria: Tour_Details_Reservati::Cancelled_chk: “Yes” ] [ Restore ] Constrain Found Set [ Specified Find Requests: Find Records; Criteria: Tour_Details_TimetableVehicle::Vehicle: “*” ] [ Restore ] If [ Get ( FoundCount ) > 0 ] Go to Record/Request/Page [ First ] #... loop array used to create Found Tour invoices begins ... Loop #... Tour details set as variables ... Set Variable [ $Tour; Value:Tour_Storage::lxt_Tour_Storage_Number ] Set Variable [ $Start; Value:Tour_Details_TimetableVehicle::lxd_Invoice_Date_Start ] Set Variable [ $End; Value:Tour_Details_TimetableVehicle::lxd_Invoice_Date_End ] Set Variable [ $VHC; Value:Tour_Details_TimetableVehicle::Vehicle ] #... Invoice Layout entered and new record created ... Go to Layout [ “Invoice_Transport_New_TC” (Invoice_Transport) ] New Record/Request #... Tour details set to appropriate deatils ... Set Field [ Invoice_Transport::Date_Tour_begin; $Start ] Set Field [ Invoice_Transport::Date_Tour_end; $End ] Set Field [ Invoice_Transport::Tour_Number; $Tour ] Set Field [ Remittance_Tour_Storage::lxt_Tour_Number; $Tour ] Set Field [ Invoice_Transport::Vehicle; $VHC ] #... If to set correct Ledger Account is executed ... If [ Middle ( $Tour ; 3 ; 3 ) = "PRT" ] Set Field [ Invoice_Transport::Ledger_Accounts; "2011 Income Other Operator" ] Else Set Field [ Invoice_Transport::Ledger_Accounts; "2010 Income" ] End If # # # Set Variable [ $$Inv_Num; Value:Invoice_Transport::__ID_INVOICE_PT_NUMBER ] Set Variable [ $$Date_Inv; Value:Invoice_Transport::Date_Invoice_PT ] Set Variable [ $$TourNum; Value:Invoice_Transport::Tour_Number ] Set Variable [ $$DateTravel; Value:Invoice_Transport::lcd_TG_Start_TC ] Set Variable [ $$VAT; Value:Invoice_Transport:: lcn_Amo_Debit_VAT_Output_Sum_TC ] Set Variable [ $$Reference; Value:Console::Vehicle ] TransportRemittance.fmp12 - Server Side - Daily Invoice Creation -1- PS Transport Invoice: Server Side - Daily Invoice Creation Set Variable [ $$GTotal; Value:Invoice_Transport::lcn_Amo_Debit_Unit_Grand_TC ] # Open File [ “Remittance 2” ] Perform Script [ “Safari Remittance - New Record - Transport Invoice” from file: “Remittance 2” ] Close File [ “Remittance 2” ] # # Go to Layout [ “Tour_List” (Tour_Storage) ] Go to Record/Request/Page [ Next; Exit after last ] End Loop #... Mail with payable Tours sent to Transport ... Perform Script [ “Transport Invoice - Mail Current” ] Else Exit Script [ ] End If #Script written b Here is the contents of "Safari remittance - New record - Transport Invoice" subscript Set Field [ Pack Safari Remittance::gt_Trigger_ Suppress; 1 ] Go to Layout [ “Pack Safari Remittance New” (Pack Safari Remittance) ] New Record/Request // Paste [ Pack Safari Remittance::Invoice_Number ] [ Select ] Set Field [ Pack Safari Remittance::Kürzel; "Pack Transport" ] Set Field [ Pack Safari Remittance::Ledger_Accounts; "1022 Pack Transport" ] Set Field [ Pack Safari Remittance::Invoice_Number; $$Inv_Num ] Set Field [ Pack Safari Remittance::Date_Invoice; $$Date_Inv ] Set Field [ Pack Safari Remittance::Tournumber; $$TourNum ] Set Field [ Pack Safari Remittance::Date_Travel; $$DateTravel ] Set Field [ Pack Safari Remittance::Input_VAT; $$VAT ] Set Field [ Pack Safari Remittance::Reference:; $$Reference ] Set Field [ Pack Safari Remittance::Amount_including_VAT; $$GTotal ] Commit Records/Requests [ Skip data entry validation; No dialog ] Set Field [ Pack Safari Remittance::gt_Trigger_ Suppress; 0 ] Exit Script [ ] Thank you for all kinds of suggestion, Amen.
  8. I have created an "opener" file called "OpenMP" that is located on the Windows Desktop. Also, a global variable for the directory where the FMP14 files are located called "$$marinaDir" = "MarinaPro v17". When activated the launcher opens but does not open the target file using the following file path, "filewin:/C:/$$marinaDir/Marina.fmp12." However if I substitute with the following, "filewin:/C:/MarinaPro v17/Marina.fmp12"; all is good. The script elements follow: #Create variable... Set Variable [$$marinaDir; Value: "MarinaPro v17"] #Start MarinaPro... Open File ["Marina"] (Marina File Path: filewin:/C:/$$marinaDir/Marina.fmp12) What am I missing?
  9. I am having a tough time getting the set field by name script step to work and hoping someone can help me with this. I have a file of sales transactions over many years. I have a related file for customers. The customer file has counters for how many times a customer visits each year, how many suits, sportcoats, etc. they buy each year ( visits_2017, visits_2016, visits_2015, suit_count_2017, suit_count_2016, suit_count_2015 and so forth). I would like my script to evaluate the year of the transaction in sales and update the appropriate counter in customers. I have been unsuccessful in defining a variable and set field by name combination to accomplish this task. Any recommendations?
  10. Below is an image of my Script. Problem Area:(Highlighted in Yellow) Set Field [Table::Vehicle_Description1; $&"VD&$i Goal: Variables $VD1-$VD8 are holding data. I am doing a loop $i which is a counter that increments from 1 to 8. If there is Data within the variable then I want the field Vehicle_Description1 to be filled with $VD1 on the 1st iteration. Current Output: When running the script, assuming data is in $VD1, I am getting VD1 within Vehicle_Description1 instead of what data is within the variable $VD1. What is unusual: The counter $i is working fine. You can see this with the output VD1 InShort: How do you read a variable when you have to concatenate and read a dynamic variable? Any help or suggestion would be much appreciated.
  11. Hello, I have a Case calculation that does not return what I expect wd1 = width of image in container1 , ht1 = height of image in container1 wd2 = width of image in container2 , ht2 = height of image in container2 A script would open up a popup window sized to the parameters of the image in the container. This is how it starts: Set Variable [ $contfield; Value:Get ( ScriptParameter ) ] //which is the name of container1 or 2 which it gets correctly Set Variable [ $ht; Value:Case ( $contfield = Untitled::container1; Untitled::ht1; $contfield = Untitled::container2; Untitled::ht2; "ERROR") ] Set Variable [ $wd; Value:Case ( $contfield = Untitled::container1; Untitled::wd1; $contfield = Untitled::container2; Untitled::wd2; "ERROR") ] The calculations return "ERROR". Which I don't understand as I would expect $ht/wd to be set to the corresponding numbers in ht1/2 and wd1/2. What am I doing wrong? Thanks
  12. My goal here is to write a database with tidier relationships than I've used in the past, so I'm intending to use discrete table occurrences of the same data. Here's the roadblock: In layout 2_week_schedule, I have 14 portals that display a staff schedule (two weeks' worth) and can't be edited. My goal is that a logged-in administrator can click on the date field of any one of those fourteen days and go to a layout 1_day_schedule that is displaying the same information, though with more details and one day at a time. The underlying table of each layout is the same, though the layouts are based on different TOs. I wrote this with a script trigger in the date field in 2_week that fires a script to copy its value as date to variable $date, switch to the 1 day layout, and set the pertinent date field there to variable $date (and then commit).I don't know if it's my error, but I think of variables as being like my computer's clipboard - any value can be copied & pasted to/from. But the script fails with the message The operation could not be completed because the target is not part of a related table. I did try a simple redundant relationship (connecting the two pertinent fields), but that was a hail Mary, and didn't do the trick anyway. Is there a better way to accomplish what I want? In short, I want administrator who's scrolling through the existing schedules to be able to look at any date where she wants to make a change, click on it, grab its contents, and be brought to a more flexible interface where its contents get inserted into a portal that will then show her the results. This file is web-accessible, so I can post its address if it helps to see what I'm talking about.
  13. Hello, I am still very amateur on Filemaker so i hope my question does make any sense. I am trying to write a script that would basically import order information from an email and convert it, first in a new account (if the customer does not exist) and later create a Sale Order. So far, I have managed to do that, but the problem i find is when trying to convert the sale order into an invoice. Since this order comes from our webshop when we receive the email means it is paid, so my aim is that when creating the invoice from the Sale order, this would be marked as paid and set the amount due to zero. This would sound a very easy task, but since our solution incorporates a payments module to manage the payment of an invoice, when i try to incorporate the payment entry within my script, there is when all the trouble starts. For some reason, it gets lost in its way when runnig the script and returns a partial payment all the time. The weirdest thing is thet if I run the script on debug mode, then all works perfectly, so my guess is that the issue may be related to the speed of the script. So, is there any recomendation as for where to put a pause script step so the script will work also when run automatically? I have tried every possible combination of long script, shorter with other scripts inside, perform script on server... and all the time something is wrong ;( Thanks a lot for any insight thst would help us move forward, since we have been trying to solve this for a week already. Best Luis
  14. HELP How can I Export using a $variable as my File Name I am a new User with Filemaker 12 on a PC. I need to export to a file and have the field "Report Id" be the file name I Exported. Sample " Field Report Id = "Mik01122015" I need to export mt data to "Mik01122015.txt" How can I Export using a $variable as my File Name "$variable= Field "Report#" Export to "Report#123.txt" I am using this script
  15. 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
  16. For an inventory management database, I'd like my main screen to be able to accept pulls from three related databases: - Serialized (valuable tools, which I track and want back - the paintbrush); - Replenishable (cheap tools that I buy by the yard and if one gets left behind I don't care - the paint-mix sticks); - Perishable (disposable tools that are left on the job site - the paint). These will handle their related requests differently. The serialized I'll be tracking properly to make sure we keep track; the latter two I'm looking for more like a system of 'tick marks' to help me know what we use on job sites. We print our barcodes. For ease of use, I'd like staff to scan into a single field in an interface that is smart enough to do the right thing based on a key digit in the barcode. So when I scan barcode 'S1234', my db knows to move it to the Serialized relation field; when I scan 'P1234,' it knows we're in Perishables. Looking for the elegant approach. My thought is that that central hot field (Scan_Here) will, when entered, store a variable and trigger a script built within the context of the related table, but I'm sometimes prone to reinventing wheels and doing stuff the long way, so I'm asking for suggestions / examples.
×

Important Information

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