Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4697 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

hey gang,

I was doing some testing after looking at a file from Todd Geist on his devcon discussion on commit records and learned alot from it. I suggest you take a look. http://www.geistinteractive.com/blog/2011/08/understanding-commit-record-video

basically i downloaded the files and was looking at his sort on one of the portals as i did not see a realational TO for sorting ; which i thought was the norm. Also, his take was pretty darn ingenious.

he uses a Let([ ] ) statement within the portal he wants to sort and a global field is placed on layout for you to type in information to find precise name, etc.

I have definately made this very simple and please take a look & see if you like. The beauty of this is the Get(ActiveStartPosition) & the Position Functions. Yeah, i said the same thing, but when i did it, i was just stunned by the simplicity yet elegance and once done, you have a library of this for future projects.

thanks Todd!!

portal_filter.fp7.zip

  • 2 months later...
Posted

Thanks for contributing. I agree, Todd's video is great! I have a few comments -- meant to be constructive -- some general, and some about your demo file:

1. For those who want to read more about "filter as you type" with a script trigger, read this article. The script that's triggered is very similar. The difference is that in the article, the results are driven by a more conventional match of key fields, but in your example the match is all in the portal's filter.

2. You said "i did not see a realational TO for sorting ; which i thought was the norm." I don't think it's the norm: I generally avoid sorted relationships, unless it's the only way to achieve the desired result. If the sort is only for the sake of the portal, it makes more sense to put the sort in the portal definition, so the relationship may be used for other purposes as well.

3. It's not really important that the portal's filter calc uses a Let statement. By highlighting that, you kind of throw the reader off the trail of what is important, which is that the portal filter is essentially doing a wildcard quickfind-like search.

4. Anyone looking to implement this technique needs to be aware that, as implemented in this example, it uses a Cartesian join. That is, the portal is set up to look at ALL RECORDS, and then filter them. If your related table (a self-join in this example) has many records, this is going to seriously slow things down. Over a LAN or WAN, even more so. The technique doesn't necessarily have to use a C-join, though, and is potentially plenty useful using typical "=" relationships.

5. Opening the demo, it's not clear what I'm supposed to type. The portal is empty, so how do I know what's going to match? In layout mode, I see the portal relationship is "portal" which tells me nothing. I go the graph and see that it's actually an instance of Products. OK. I go to the Products layout and see... nothing, because the "name" field has been placed in a broken portal. My point is, a little file cleanup and respect for your reader would be helpful and appreciated.

Posted

Fitch, thanks for the constructive criticism. at the time i was just so excited all i was doing was making videos about what i had learned, albeit nothing too much that made sense to me if you know what i mean. Now i really am learning. Most importantly is UNDERSTANDING DATA Structure, which is almost forced when using filemaker.

I wont be doing any more videos anytime soon for sure, unless in really know the topic.

cheers,

-i

  • 1 month later...
×
×
  • Create New...

Important Information

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