Jump to content
Server Maintenance This Week. ×

tell every (record whose ...)


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

Recommended Posts

I've searched the forums and probably put in the wrong search terms and the Apple Events db does not provide examples that are helpful. I've looked at Hannaan's book where he describes how you can use the whose clause to work directly with a table's records without doing the Find steps.

I'm trying to get cell values of a select part of a table, but cannot within the tell block of the "whose" clause. Uncomment the below and you'll see my result. How would you iterate through this subset?

My goal is to save this info to a list, and then those values will be used to discriminate records that have this value. Each of those records have certain fields populated depending on what the value of "y" will be, if that helps.

thanx, sam


tell application "FileMaker Pro"

	tell table "2008X2DGEN"

	--	tell (every record whose (cell "AREA_ID__C" is "R8M00"))

			set x to count of records

			repeat with thisVar from 1 to x

				tell record thisVar

					set y to contents of cell "ADDRESS_NAME__C"

				end tell --thisVar

			end repeat

--the above works, but works on every record, not the subset in the 'tell block'

	--	end tell --r8 records

	end tell --table x2

	return y

end tell

Link to comment
Share on other sites

  • 2 weeks later...

If your goal is to generate a list from those cells then you could go right to a list within the tell record.


tell application "FileMaker Pro"

    tell table "2008X2DGEN"

       tell (every record whose (cell "AREA_ID__C" is "R8M00"))

            set x to count of records

            set addressList to cell "ADDRESS_NAME__C"  

              end tell

        end tell

end tell

Link to comment
Share on other sites

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