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

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

Recommended Posts

Posted

i need to write some SQL queries and take the result of the queries and run a loop and get count of a particular field based on some conditions. It is kind of a complicated mess. I am trying to figure out how to go about it in FileMaker. Has anyone been in a similar situation ?

Posted

Well, with that rough description, you'll get rough answers.

In FMP, what is often done with SQL queries is done via "Find" to

select the set of records of concern... then you can use the fields

of those records in various calculations... or you can iterate through

the found set by using "scripts". Open up ScriptMaker and you'll see

that it offers a fairly general purpose programming language for

processing data.

Posted

Why not B)

1) turn the querries into global keys or global concanate keys, Keyword 1 & " " & Keyword 2 & " "& Keyword3 (call it cg_CompoundKey)

2) Count using the Count (::Relationship: field)

Where the Relationship involves the cg_CompoundKey for the left side and an indexed key at right side (which would be the stored CompoundKey for each record)

  • 4 weeks later...
Posted

1st hide your SQL books it will confuse u more....SQL logic is barely used in FM...the closes I got was with Ugo's "joined" fieids approach.However, those scripts are pretty nice althoug "1 step at the time" kind of approach

goto filed...enter...peform find...goto layout...blah blah

whereas u just "run" the stored_proc with all the AND IN WHERE in one nice little statement wink.gif

Ayhow, most definetly spend time looking at those scripts

All the best!

This topic is 7764 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.