Jump to content

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

Recommended Posts

Posted

Lest Let leads to lunacy, I request anyone's help. As I usnderstand Let, any field or function can be a variable, and an expression can be any field, function or constant. Thus a complicated set of functions can be expressed in a simple manner.

I want to "explode" a field entry for a portal matchfield. This field with have 2-3 words. In the past I used nested functions (left 3 letters(middleword(fieldXYZ)&"PP"& further repetitions with increasing size of text which makes for long calculations. I thought Let will simplifiy this:

Let(

[ Leftword(fieldXYZ,1) = "one"; Middleword (fieldXYZ, 2,1)="two"; Middleword(fieldXYZ, 3,1)="three"]; left(one, 1)&PP&left(one,2)...)

I assume the square bracketed entries define my expressions and the second part is the function using those expressions. In practice, this doesn't work.

Is my concept contorted, my puncuation pickled?

"It's never so bad that it can't get worse."

Posted

The let function allows you to define variables on the fly and use them for the life of the calculation.

You would define your let in this fashion.

Let ([ // >>> this is the opening for the let

one = Leftword(fieldXYZ;1);

two = Middleword (fieldXYZ;2;1);

three = Middleword (fieldXYZ;3;1)

]; // >>> this closes the list of variables

one &

Posted

Thanks for the info about Let. I'll give it a try.

Regarding the relationship definition making the exploding field obsolete, I tried this without success. I used the less than or equal sign to relate the fields but without the desired effect. The effect is the gradually constrained portal list as I type more of the letters into the matchfield.

In FM magazine on the web, the download of a recent article showed how this was done but again did not produce the desired result. As far as memory, the terabytes of data per file available is well above the maximal needed.

If there is more to relationship definition then simply relating the fields with the less than or equals sign, I'll keep an open mind and will be glad to hear/read about it.

(Mind like parachute, only function when open - Charlie Chan)

Thanks again.

Posted

Hey Oldsneekers, I think I understand your issue. The <, >, <=, >= relationship operators work for relationships based on text fields, like First Name and Last Name. But they won't work right for fields with multiple words, like Full Name. You can't type "J An" and see results including John Anderson, nor could you just type "Anderson". Each word would need to be split out into separate fields with relationship ranges set up between each one.

If you still want to use a combined search field, you will need to use the multikeys. These can be made very easily with custom functions, though you will need the Developer version to install them into your solution. There are a variety of custom functions that others have already built for exploding fields into multikeys (exploding by letter, word, or both.) There is a good listing here:

http://www.briandunning.com/filemaker-custom-functions/

Some of these exploding keys can be built the old fashioned way, but custom functions make it easier.

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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