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

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

Recommended Posts

Posted

I am new to FM6, but getting a firm grasp on its capabilities. I need some advice on how to perform this task.

I have a user that needs a report from an existing layout. I could easily give her what she wants if FM would accept SQL statements. My SQL statement would proceed as follows: SELECT * from ENROLL where SCHOOL EQUALS "X" or SCHOOL EQUALS "Y" ; (may be a mistake in syntax, but you get the idea.)

I wrote a script that will go thru select "X" schools :

Enter Find Mode[]

Go to Field["School"]

Insert Text["School", "X"]

Perform Find[Replace Found Set]

I need to be able to get the "Y" schools into this report. What can/should I do??? I am familiar with PHP/FX, but I'd rather try something else before delving into coding this report - especially for what seems like a simple report.

Thanks

Posted

Enter Find Mode[]

Go to Field["School"]

Insert Text["School", "X"]

New Record/Request

Insert Text["School", "Y"]

Perform Find[Replace Found Set]

Posted

You can also create a relationship from a global text field to the School field, have the data for the find entered in Browse Mode, press Return for each item, then use Go to Related Record [show, gText|School].

Or

Enter Find Mode [ ]

Set Field [school, "X"]

New Record/Request

Set Field [school, "Y"]

Perform Find

Posted

I'm with Mr. Q, I was just in a hurry and copied and pasted the original script.

Note that:

Go to Field is not required when you use Insert, since Insert already specifies the field; and,

Set Field is generally preferable to Insert, since it doesn't rely on a particular layout or the field's presence thereon.

A notable exception to this is when searching for boolean or ranges in a date field, you would need to use Insert.

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