Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won


madman411 last won the day on September 16 2015

madman411 had the most liked content!

Community Reputation

2 Neutral

About madman411

  • Rank

Profile Information

  • Gender
    Not Telling
  1. Thanks, Comment. This worked a charm.
  2. Trying to trim characters from both the left and right of a value in one field. There are no breaks or symbols within the value. For example, the following value is in my "full_ticket_number" field: 2900686073681910 In a separate calc field I need to have the "29" from the left and the "0" from the right removed to provide the value: 0068607368191 In this example, the "29" and the "0" seem to be some sort of control character placed there by the issuer, which have no use for me in my solution. Of course the value is unique for each record so I can't just have the calculation look for certain characters to apply the function to. I've tried to combine both the Left and Right functions, but FM is providing errors I can't seem to solve. Advice much appreciated!
  3. Hello All I have been playing with the free Airline seating demo file from SeedCode. I think this is great and I'm looking to modify it in a way that allows for multiple aircraft configurations, but I'm hitting major snags. For the record, this is just a personal project and in no way is being distributed or sold. If you look at the attached file, they've used repeating fields to create the seat map. The repetition is captured and turned into a seat assignment. Thing is, the seat map used in their file in no way mimics a real-world commercial aircraft and there doesn't seem to be a universal way to map seats among multiple variations of aircraft configurations without extensive calculations. As an aviation enthusiast, I modified the seat map in the FRONT file to replicate a common Boeing 777 configuration with three classes, but as of now this only works properly when there's only one specific seat map. Rows 1-12 are First Class, with a 1-2-1 seat configuration. 17 rows are "skipped" and Economy Comfort are rows 29-32 in a 3-3-3 seat config. Rows 33-57 are standard Coach in a 3-3-3 seat config. Using their existing calculation set up, repetitions 1-48 accurately calculate to the correct seats in First Class. To then map Economy Comfort correctly you then have to skip to repetition 253. That's 205 repetitions completely ignored. The part where I'm hitting a brick wall is integrating additional aircraft seat maps for other "flights", such as an A320, which has a completely different seat map configuration. I don't see how this existing table/relationship/script structure would allow for the database to track more than one map. I've separated the aircraft map into a separate window and considered different layouts for different aircraft seat maps linked to different tables. Each aircraft seating map using a different script, however, the passenger information part of the database would need to be consistent, no? Also, with their current script, dragging a First Class passenger to an Economy Comfort seat yields a seat number which is completely off. With their current config and a larger aircraft I'm struggling to get FM to calculate remaining/unassigned seats in each cabin leading me to believe this might be easier using records rather than repeating fields. Any input appreciated AirplaneSeatingDemo.fmp12.zip FRONT.fmp12.zip
  4. Hi All I'm running into a bit of a calculation dead end. I have an "order" table displayed in a portal where my users can create orders. The user can add a group of records (a kit) from the inventory table. The first related record is a "master" record which shows a description title and a subtotal (see attached image) and where I would like the user to be able to adjust the quantity for the overall group of records. When initiated the script assigns these related records a GroupID which is currently set as a self join (OrderLine::GroupID = OrderLineKit::GroupID). The system calculates accurately if the master record quantity is set to 1, but if the user increases this quantity to two or higher I'm getting the numbers overlapping (stacked fields) and then the user can't manually adjust any of the other quantities without some strange results due to my current calculation. Some grouped records are added with pre-existing quantity amounts which need to be doubled/tripled, etc, if the user increases the master quantity, however the user should still be able to manually change any quantities. The quantity field is where it's driving me crazy. I have the following fields that are stacked: Qty (calc field, hidden on master record row) KitQty (hidden on all portal rows except for the master record row) QtyOR (quantity override, hidden on master record row) When the group of records is added it populates the quantities in the QtyOR field. Currently my Qty field has the following calculation: If ( isEmpty ( OrderLineKit::KitQty ) ; QtyOR ; QtyOR * OrderLineKit::KitQty ) I know my script is missing criteria which is giving me these issues. I hope I explained myself well enough for people to understand. The below image shows an example group of records with the master quantity set to two. The prices and such update properly, but there's an overwrite issue (Qty and QtyOR data displayed on far right for example purposes). Aside from this problem my system works just as expected. I'm so close to wrapping up this part of my database!
  5. The system is connected to QuickBooks. The system subtotals on certain rows so when my boss pushes his orders to QB to create an invoice he only wants the information on these rows passed through.
  6. Hi all I'm trying to create a calculation (order::list) to list related records that have the value of "1" in a field in the related table. My tables are "order" and "order lines". I use a portal for "order lines" on my Order layout. Right now they're connected by Order::OrderID and OrderLines::OrderID. Two fields in order lines table are OrderLines::Description and OrderLines::Flag. If the flag field is "1" I need the list field to list what's in the description field with a carriage return for all related records where the flag field is 1. If it's 0 or empty then that record needs to be ignored. The List function works fine to return the contents of the Description field of all related records, but I'm struggling to make the calculation only look for certain values. I'm sure this is pretty simple but help would be much appreciated. Thanks!
  7. Calculating blocks of time

    Alright. I think I have it, but I've become a little dazed while trying to debug my calculation while thinking in standard time. As usual I overcomplicated things in my head... Comment, please grade: Let ( [ period1dur = Min ( Meal1Start ; Meal2Start ; WorkEnd ) - WorkStart ; penalty1dur = Max ( 0 ; period1dur - 6 ) ; period2dur = Min ( WorkEnd ; Meal2Start) - Meal1End ; penalty2dur = Max ( 0 ; period2dur - 6 ) ] ; 4 * penalty1dur + 4 * penalty2dur )
  8. Calculating blocks of time

    Comment Works a charm! I can definitely work off of this. Would you suggest calculating the second block of time in a separate field?
  9. Hi guys I've created a small database to track my hours as an independent contractor in the entertainment industry. I have everything working great and want to implement one more feature into my time calculations, which I think is a little more complicated. I have been doing this manually so far and then adjusting my "Total Pay" with an overwrite field. Currently I'm tracking time as decimals (i.e. 1:15PM is 13.25, etc). In my industry we have what are called meal penalties which an employee can start incurring if they haven't been broken for lunch within 6 hours and again if they're not broken for a second lunch 6 hours after the first lunch ended. 1 (one) meal penalty accounts for a 15 minute block of time, so if you start at 6am and aren't broken for lunch until 1pm, thats four meal penalties. If you again aren't broken at 7pm, respectively, you then start incurring more penalties until they either break you for the 2nd lunch or wrap you, and so on. Typically it's more common for meal penalties to be incurred at the end of the day (they make you work while eating your second meal) and we'll rack up meal penalties up until they finish us for the day ("wrap"). Ideally, I'd calculate how many meal penalty blocks I've incurred as a standard number. 1, 2, 3, 4, 5, etc... Currently I have the following fields calculating my days: ((Invoice Terms)) Pay Rate ((TimeCard)) Call, Meal 1 Out, Meal 1 In, Meal 2 Out, Meal 2 In, Wrap, Total Hours, Total Pay I want to add: ((Invoice Terms)) MealPenalty Rate ((TimeCard)) MealPenalties Incurred And then I can add the meal penalty pay into the total pay appropriately. My main concern right now is just calculating the blocks of time. Any help in calculating this penalty dealio my industry has so gratefully provided us as contractors would be great!
  10. Print two tables on one report

    I've created a database that automatically complies an invoice for time worked. I'm loving how it's working. When trying to generate a report I need the report to include two sets of information (from two different tables), ideally in two separate parts: - TimeCard table - Reimbursements table Both tables are linked to a primary table called Invoicing by the InvoiceID. Creating a report that displays the information individually is easy - I select either the TimeCard or Reimbursements table the Layout Setup window, set to view as list, place the desired fields within the body part setup, and bam. Is there a way to do this without the use of a portal to display the second set of information? Ideally the report resizes itself based on how much related data is being displayed. I don't want to account for 10 portal rows to display related reimbursements if there are no reimbursements. Thanks
  11. Hi everyone I've created a window that opens when the user chooses to print a report. I would like to give them options on how to generate this report (or which layout to go to depending on their selected options). The client is very picky about choosing what information they want available when they print certain reports. Of course, I want to allow them a few options to choose from so they can provide more/less info should they choose. A few of the options I've provided as checkboxes in a global field: - Show line amounts - Show line comments - Include order disclaimer - Show system order notes etc... I know a script using IF statements could direct FileMaker to the correct layout to print, but I feel this could be a very hefty script and quite hard to keep track of when using "show line amounts" and "show line comments" as the results. Perhaps there's a way to calculate the correct layout using a numerical result? Thanks!
  12. Advancing letters when script triggered

    Thanks comment. This did cross my mind. Do you mean the entire order is "duplicated", child records and all (related 'line items' within the order)? Is there a link you can share that can explain a little more? I would've thought this would be a hefty script...
  13. I have a field that displays a "version" in my invoices. All new invoices start as version "A", however when a certain script is triggered I need the version field to advance to "B", then to "C" if it's triggered again, and so fourth. I thought if I could capture the current version as a variable and then set the Version field as $version + 1 would do the trick, alas I was incorrect. What's the best way to script this? Additionally, should the Version hit letter "Z" I would like the alphabet to start over again as doubles, such as "AA", "AB", "AC", etc... Thank you! === Update: So some tinkering and I got this calculation to achieve what I want. Using Set Field: Char ( Code ( $version ) +1 ) However, after "Z" I start getting other characters, like "[". Is there a way to prevent this like I mentioned in my previous post?
  14. Desktop shortcut

    I remember a while ago looking into creating a desktop shortcut to a file hosted on a server machine and it was a little more complex than I expected it to be. Has anyone had luck in creating a desktop shortcut that opens a FMP file over the network? I'd also like to use the icon I created rather than use the FileMaker default. I would need to create a shortcut on Macs and Windows computers.
  15. Using the Hide Object When calculation engine feature I'm attempting to hide a button no matter what the state of the layout... Get ( WindowMode ) = 0 or Get ( WindowMode ) = 1 The first function occurrence works, no matter if I'm referencing 0 or 1 as a result, but the second function doesn't seem to work at all. Is OR the wrong expression here or is the calc engine expecting an IF statement? I have some hidden off-layout pop-up buttons that seem to appear when the user enters Find Mode (when I use 0 as the first result). I want these buttons to be hidden in every mode except layout mode.

Important Information

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