On Nov 13, 2008, at 5:39 PM, Deborah Tinsley wrote:
FMP 8.5; Mac OS X.3.9
First, thanks to Jonathan Fletcher for the advice about using the List
function on portal records to concatenate the artists names into one
field
(this is for my data flattening project). I haven't quite figured
out how to
make the Let function work - but I will. Thanks.
"Let" just allows you to create one or more variables first and then
use those variables to construct your result. The brackets "[]"
surround your variable definitions if you have more than one. The
first semicolon after the ending bracket is your "second argument" and
anything that appears between that and the last parenthesis will be
your output result.
You could have one variable definition:
Let (
area = pi * radius^2
;
area // What gets output
)
Or you could have multiple definitions (note the addition of the
square brackets):
Let ( [
area = pi * radius^2 ;
length = lengthField ;
volume = area * length // Notice it's using variables just defined
] ;
volume
)
All names on a line before the equal signs are _really_ local
variables. You can prefix them with dollar signs and they will become
available to the rest of a script that contained the calculation (FMI
calls these "local" variables, but actually are less local that the
ones that you don't even preface with dollar signs). If you preface
them with _two_ dollar signs "$$" (known as "global" variables) they
will be available in the rest of the file until you either re-set the
value or close the file.
You can use a let statement anywhere you can enter a calculation,
which is a LOT of places in FileMaker. It is one of my favorite ways
of documenting my solutions, in that the calculations then become VERY
readable and much easier to understand. I do it less for the
developers who might follow me as for myself who has to decipher a
mess months or years down the road.
When importing found set data from a file to an empty clone of the
same file
(all the related table data exists), I lose the data in the portals.
They
show up blank.
When I map the data, I'm not sure how the portal field are included.
The
data exists in the parent table - i.e. Artist names are in the
Artist Name
table - but do not show up in the portal in the Image Data table.
What am I missing?
Only two things that I can think of that might be causing this:
1. You didn't import all your tables, only the main one. You probably
need to switch to a layout that is defined with a table occurrence for
your artists table and import those records as well.
2. If you setup only _has_ one table, you need to make sure all your
fields are importing. Use the Matching Fields option in the import
dialog.
HTH,
j.
--
Jonathan Fletcher
[EMAIL PROTECTED]
Project Foreman
NewMedia Construction Co.