dbTalk Databases Forums  

Filemaker Pro scripting for "real programmers" ???

comp.databases.filemaker comp.databases.filemaker


Discuss Filemaker Pro scripting for "real programmers" ??? in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
LinuxCub
 
Posts: n/a

Default Filemaker Pro scripting for "real programmers" ??? - 02-18-2011 , 10:57 AM






Help wanted with Filemaker Pro scripting ...

I don't get it ... It seems to me as if, by catering for non-
programmers, they've actually made it near-impossible for a programmer
to understand ... "layouts" ? who needs layouts when nothing needs to
be shown on-screen ? Why no SQL ? Cursors ? How does one do something
like cursors in Filemaker Pro ???

Is there a Rosetta Stone somewhere with "Sane SQL / RDBMS concepts"
translated to/from "crazy amputated Filemaker Pro scripting "language"
concepts" ???

Reply With Quote
  #2  
Old   
LinuxCub
 
Posts: n/a

Default Re: Filemaker Pro scripting for "real programmers" ??? - 02-18-2011 , 02:58 PM






My employer has, for lots of reasons, forced me to use FM.

I'm not (quite) complaining that FM is not That Other Tool.

I'm complaining about the fact that there seems to be no suitable documentation that teaches FM in terms that someone used to C / C++ / Embedded SQL etc. can easily understand. Well, at least so far my Google-searches have gone unsuccessful. Surely, I'm not the only one with such previous experience?

An example of the disconnect between my previous experience and FM:

Filemaker has a "next record" type command, but it takes _NO ARGUMENTS_
So that has to mean that I cannot have nested loops or multiple "cursors"
(because I cannot specify which g*ddamn cursor I want to move forward)

And the documentation I've found on filemaker.com has nothing to say about this.

Reply With Quote
  #3  
Old   
Lynn Allen
 
Posts: n/a

Default Re: Filemaker Pro scripting for "real programmers" ???X-TraceApproved - 02-18-2011 , 04:40 PM



On 2011-02-18 12:58:40 -0800, LinuxCub <linuxcub (AT) email (DOT) dk> said:

Quote:
My employer has, for lots of reasons, forced me to use FM.

I'm not (quite) complaining that FM is not That Other Tool.

I'm complaining about the fact that there seems to be no suitable documenta
tion that teaches FM in terms that someone used to C / C++ / Embedded SQL e
tc. can easily understand. Well, at least so far my Google-searches have go
ne unsuccessful. Surely, I'm not the only one with such previous experience
?

An example of the disconnect between my previous experience and FM:

Filemaker has a "next record" type command, but it takes _NO ARGUMENTS_
So that has to mean that I cannot have nested loops or multiple "cursors"
(because I cannot specify which g*ddamn cursor I want to move forward)

And the documentation I've found on filemaker.com has nothing to say about
this.
Go To Record, if you have to move through records until you hit one
that meets a certain condition, is put inside a Loop, with an Exit Loop
If test. So pseudo-code in the Scriptmaker would look something like
this:

Loop
Exit Loop If [test goes here, for ex. Invoice Status = "Paid"]
Go to Next Record/Request [Next, Exit after Last]
End Loop

That's where you put your arguments. You can also use Go To Record by
number, or if you know or can calculate how many records forward you
want to jump, there's Go To Record by calculation.

I highly recommend a third party FM reference, such as
http://www.amazon.com/FileMaker-Pro-...8068243&sr=1-1

which

gives an easy way to look at the useage and syntax of functions and a
basic map of how to get there from here in FM.

I'm not aware of a SQL -> FM developers manual, because frankly, most
FM developers started out as creative or business knowledge experts who
built something in FM and somehow ended up FM experts who make a living
at it. I know dozens of FM developers personally, and I can think of
TWO who have computer science degrees. Many FM developers teach
themselves SQL. Very few people go the other way, though some do. But
those people who start with SQL and branch out or transfer to FM teach
themselves, just like those who start out in business or creative
industries.

In spite of the enormous installed base of FM, there are no formal
classes in any educational institution I'm aware of that teach FM. It's
pretty much learn on the job. Sorry. There are training programs that
will teach you the basics, and at least get you up and running.

Look at it this way, the good news is that good data structure is good
data structure no matter what tool you use. Once you've got that
licked, the rest is details and a good reference manual.
--
Lynn Allen
--
www.semiotics.com
Member FBA
FM 10 Certified Developer

Reply With Quote
  #4  
Old   
Your Name
 
Posts: n/a

Default Re: Filemaker Pro scripting for "real programmers" ??? - 02-18-2011 , 06:03 PM



In article <4d5ef560 (AT) news (DOT) bnb-lp.com>, Lynn Allen <lynn (AT) NOT-semiotics (DOT) com>
wrote:

Quote:
On 2011-02-18 12:58:40 -0800, LinuxCub <linuxcub (AT) email (DOT) dk> said:

My employer has, for lots of reasons, forced me to use FM.

I'm not (quite) complaining that FM is not That Other Tool.

I'm complaining about the fact that there seems to be no suitable documenta
tion that teaches FM in terms that someone used to C / C++ / Embedded SQL e
tc. can easily understand. Well, at least so far my Google-searches have go
ne unsuccessful. Surely, I'm not the only one with such previous experience
?

An example of the disconnect between my previous experience and FM:

Filemaker has a "next record" type command, but it takes _NO ARGUMENTS_
So that has to mean that I cannot have nested loops or multiple "cursors"
(because I cannot specify which g*ddamn cursor I want to move forward)

And the documentation I've found on filemaker.com has nothing to say about
this.

Go To Record, if you have to move through records until you hit one
that meets a certain condition, is put inside a Loop, with an Exit Loop
If test. So pseudo-code in the Scriptmaker would look something like
this:

Loop
Exit Loop If [test goes here, for ex. Invoice Status = "Paid"]
Go to Next Record/Request [Next, Exit after Last]
End Loop

That's where you put your arguments. You can also use Go To Record by
number, or if you know or can calculate how many records forward you
want to jump, there's Go To Record by calculation.
Another option could be to first perform a Find for the appropriate
records, then the Go To Record [Next] command will simply step through the
Found Set containing only matching records.




Quote:
I'm not aware of a SQL -> FM developers manual, because frankly, most
FM developers started out as creative or business knowledge experts who
built something in FM and somehow ended up FM experts who make a living
at it. I know dozens of FM developers personally, and I can think of
TWO who have computer science degrees.
I have a Computer Science (and Mathematics) degree, but other than writing
a few custom Mac applications, I've never really had any use for it.

"Real programmers" would of course be writting their own applications
using binary code, not mucking about with FileMaker, SQL or anything else
built by someone else. ;o)


Helpful Harry )

Reply With Quote
  #5  
Old   
LinuxCub
 
Posts: n/a

Default Re: Filemaker Pro scripting for "real programmers" ??? - 02-18-2011 , 06:18 PM



""Real programmers" would of course be writting their own applications
using binary code, not mucking about with FileMaker, SQL or anything else
built by someone else. ;o)"

I'd prefer to have the data in MySQL or PostgreSQL, manipulate it using something like Embedded SQL in a C program.

But it is only a temporary job (one month, which I'm not getting paid for, because I'm unemployed, and I _must_ take the job to continue receiving unemployment benefits), and my boss (who knows bupkiss about programming) needs to be able to later maintain what I write during that month. So I'm stuckwith FM, because that's what my boss feels comfortable with. He's one of those "business knowledge experts".

Reply With Quote
  #6  
Old   
LinuxCub
 
Posts: n/a

Default Re: Filemaker Pro scripting for "real programmers" ??? - 02-18-2011 , 06:25 PM



And BTW, you also miss my point about "next record". Let me try to explain it another way:

Lets assume that our table(s) are written on a piece of paper, one line perrecord.

Looping through the records in one table would correspond to first putting your finger on the first line on the paper, and the "next record" operationcorresponds with moving your finger to the next line (or exiting, if thereare no more lines/records. I get that part. That was never the question).

Now imagine that we're dealing with 2 tables, so pieces of paper. And 2 loops, one nested inside another. We can do this, because we have 2 hands, onehand corresponds to the outer loop, the other hand corresponds to the inner loop.

But when I say "next record", how do I specify which hand I want to move.



Sigh. Did that help at all ????

Reply With Quote
  #7  
Old   
LinuxCub
 
Posts: n/a

Default Re: Filemaker Pro scripting for "real programmers" ??? - 02-18-2011 , 06:54 PM



Oops, "where id = :a_id" should probably be "where id < :a_id" to match the first SQL example

Reply With Quote
  #8  
Old   
LinuxCub
 
Posts: n/a

Default Re: Filemaker Pro scripting for "real programmers" ??? - 02-18-2011 , 06:58 PM



About that book you recommend (and which I've been reading):

"a basic map of how to get there from here in FM."

Only if "here" is "business knowledge expert", I think.

I'm a programmer, not a "business knowledge expert", that's the problem :-)

Le sigh.

Reply With Quote
  #9  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: Filemaker Pro scripting for "real programmers" ??? - 02-18-2011 , 07:01 PM



On 2/18/2011 4:25 PM, LinuxCub wrote:
Quote:
Now imagine that we're dealing with 2 tables, so pieces of paper. And 2 loops, one nested inside another. We can do this, because we have 2 hands, one hand corresponds to the outer loop, the other hand corresponds to the inner loop.

But when I say "next record", how do I specify which hand I want to move.
Your context is set by which window and/or which layout you are on, or
that you switch to, and using the found set in that window or layout.

Quote:
select * from people a, people b where a.id > b.id

That would give me all possible pairings (I think). (This is a self-join type of situation).
1) Create a relationship between two table occurrences of the People
table, 'a' and 'b', from ID field to ID field.
2) Perform a find on the records you want, on a layout based on 'a'.
3) Export the records, while on the same 'a' layout, but exporting the
related 'b' fields (or a combination of a and b fields. It will export
all of them.

or at least that's one way of probably many.

Reply With Quote
  #10  
Old   
LinuxCub
 
Posts: n/a

Default Re: Filemaker Pro scripting for "real programmers" ??? - 02-18-2011 , 07:12 PM



The term "layout" gives me the creeps, because I don't want anything to be shown anywhere. This is supposed to be something run on a server, automatically, with no user looking at any screen.

But I'll see if I can make sense of what you're saying. At the moment, I still don't know what you mean by "export" (but that's just because I've only been exposed to FM for 2 days).

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.