Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About qube99

  • Rank

Profile Information

  • Gender
  • Location
    Dripping Springs, Texas

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. There are times when you will have a range of values in a field across a found set of records that you would like to scale to another range. Common ranges to scale are 0-1, 1-10, 1-100 etc. The input values could be anything of any range. To do this start by creating 4 global fields called oldMin, oldMax, newMin and newMax. oldMin and oldMax are the smallest and largest values in your found set. newMin and newMax are the smallest and largest values you scale the range to. Go ahead and populate the newMin and newMax values. Let's use 1 and 100 for example. To populate oldMin and oldMax
  2. It looks to me like he is already using portals on a tabbed layout. So let's think about another way to create a list of all the tasks. You have 6 task tables that are related to a single record. Those 6 tables are displayed in portals. Maybe a special table could simply be related to the other 9 so that when a new record was created somewhere, a copy is created in the special table with a little scripting. In this manner he can have the single table schema for reports, subsummaries, charts, etc without altering the multi-table scheme he is probably employing. Seeing those portals tell
  3. I think I might have bult only a single task table and designated A, B and C in a field, like a category. That makes it pretty simple to view them collectively or individually. I might go further and do the same for Projects so that there is a single table for everything. Then use various layouts with filtered portals to display just the parts I want to see. A data structure like this will also open up your possibilities for creating subsummaries. You might enjoy the FileMaker Training Series. I think its a free download (sorry dont have the link) and is pretty good for learning these sort
  4. I have an update on this. While Wim's evaluate() method would work beautifully in some circumstances, and I recommend it be the first thing you try, it would not work in my special case. I now have workaround. Instead of writing an expanding list of conditions into a variable for the if() to test using evaluate(), I wrote them to a table and linked it through a multivariate relationship. When my filter function runs it now loops through those portal records and tests them 1x1, exiting the loop on the first test that fails. This certainly works better than scripted finds and yielded a n
  5. You might set a global variable containing the record ID while you are on you record of interest. When you get ready to go back use that global variable which contains your record ID. There's a couple of other ways to approach this.
  6. I could not get it to work in a production environment. You cannot use that if() wth a variable that contains evaluate() anywhere else except right where you're going to use it. It gives very wrong results otherwise. You cannot even wrap that variable in an if() without it breaking. Also, you cannot use the variable in another script and cannot write to it from another script. It only works in very limited circumstances. One might guess that evaluate() is working in the context of where it was created, not in the context of where you want to instantiate it. The thing simply won't work wher
  7. Thanks, Wim. You get my upvote. I now have a dynamic if() using evaluate(). I started with an if() with 2 boolean tests if[ $$parentLastMove ≠ "AL" and $$recentAncestors_AR ≠ $$ancestorLimit_AR] I replaced the if() to read if[evaluate($$filter_AR) where $$filter_AR contains the same thing the original if() had $$parentLastMove ≠ "AL" and $$recentAncestors_AR ≠ $$ancestorLimit_AR I made a copy of the enumerator and ran both versions on a short problem. They both reported the exact same results. Had evaluate() not been correctly evaluating both of the boolean tests, I
  8. I think the answer might be on page 9-23 of FTS 12 - multi-line keys. A portal will match a record that contains a line delimited list in the match field. My loop has 2 functions in it, a filter and a find. When find sees something it wants filter to know about, it can write it in a multi-line key field, a single global field in a related table. That field will contain a constantly changing list of things to filter while the loop is running. Then when the filter runs it tests that global field for the if() condition and should return true if anything in the list matches. There's no way
  9. I have an if() that contains a list of conditions separated by logical AND. Can I revise that list of if() conditions on the fly? When another part of my program detects something I'd like to add another condition to my if() so that it's there when the program loops back through. I just can't think of a way to do that.
  10. I recently tested a few script methods for speed and thought I'd share what I saw. I have a FMP project that constructs a ternary tree database. I set up a design and ran it under varying circumstances in order to determine my best practices for this project. I am learning FMP and would like to know these things for all my projects. As a baseline I ran 2000 nodes of a single design. I looked at 3 main script parts. Times are in milliseconds No filter, no find, no print 1569, 1611, 1580 No filter, no find, with print 5446, 5512, 5473 about 4 seconds to print 2000 records 1x1.
  11. I was unable to figure out how to use validation in my scenario. I need a boolean result for branching logic and I was unable to get validation to return anything other than 0 for get(lastError). My script goes haywire with it so I need a way to control the thing. Maybe someone has a method they can share. FMP is really not going to succeed at anything other than the smallest problems I'm working on. It has proved invaluable as a rapid development environment. I'll recode the thing in C++ once I get all the parts figured out. I have done a bit of script method efficiency testing so I'l
  12. I wasn't speaking generally but about my specific project. I looked at all the global variables in it (for the umpteenth time) and I only see one place where a script parameter could be used. In all other circumstances I cannot imagine that a parameter could be used without constructing some Rube Goldberg methods of parsing them, say passing 25 variables used in multiple subscripts in a single parameter. This specific application is pretty unique and not applicable to normal business logic. What's of utmost importance at this stage of development is speed. Some of the calculations I w
  13. Looks like you;'ve given this a great deal of thought. I had run into the limits of human thought but never stated it so clearly.A major part of solving a problem is to state it clearly, which you have done. I don't know how long these scripts in my current project would have taken to write if I had not broken the thing into subscripts. I tried but it was mentally overwhelming. I was forced to break the problem into smaller peices and deal with each in turn. I got it working properly and am now cleaning up the scripts. It gets a little messy when ya do countless script revisions over many
  14. Thanks for the tips. That file was in Dropbox website. It's just a temp file. I started off looking at my data structure as a binary tree with no knowledge how to code one. After seeing this illustration at Wolfram the solution came to me. First I realized that my data structure was actually a ternary tree, exactly like this: Looking at this I realized that I could construct one with FMP without using recursion. Here's how. The nodes are numbered sequentially. So all I had to do was use a node counter. Go to node 1 (which is record 1 in FMP speak) and spawn 3 children with a s
  • Create New...

Important Information

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