Jump to content

wlao

Newbies
  • Posts

    3
  • Joined

  • Last visited

Everything posted by wlao

  1. I am having problems retrieving values from a table unless I am displaying a layout in FileMaker containing the fields (or table - I am not sure which...) For example, when I have a table containing the following records: Table: Manuals ManualID ManualName Language 0001 First manual EN 0002 Second manual EN 0003 First manual DE 0004 Second manual DE and I want to get every manual with Language="EN", I use the following AppleScript to get the IDs (not the ManualID) of those records: --Get a reference to the table I am using tell application "FileMaker Pro" to set manualTable to (first table where name is "Manuals") as reference set theLanguage to "EN" -- Get every manual with the set language tell application "FileMaker Pro" set theManuals to (ID of every record of manualTable where (cell "Language" = theLanguage)) as list end tell This script usually works fine, but if I change "theLanguage" to "DE", the variable "theManuals" is usually undefined/empty unless the layout "Manuals" (containing all fields in the table "Manuals") happens to be displayed in FileMaker. I can fix this by adding the line "show layout "Manuals"" before retrieving the records, but I thought that by accessing the tables directly it would be unneccessary to involve flipping layouts and windows in FileMaker when accessing the databases. Any pointers to where I am screwing things up would be appreciated.
  2. Well, sometimes it helps to just to ask for help... I found that my calculation field was set to "Numerical", and when I changed it to "Text", it suddenly worked. Or maybe it was the random clicking that actually helped..
  3. Hi all, I am desperately trying to get the items in a portal sorted properly but has so far failed utterly. I am trying to keep track of a number of images that are used in a number of documents, and therefore I use a Documents layout containing a portal showing the names of the images that are related to each document. And I would like to have this list sorted alphabetically. Each image can be used in several documents, so I am using a "link" table that connects the (unique) document ID with the (unique) image ID. Thus, my database consists of three tables: - one for documents - one for images - the link table that connects the document with the image I have tried everything (I think), but the items still seem to be listed in the order they were created: - I tried to sort the relationship between the link and the image tables by the image name - I tried a number of other ways of sorting the relationships as well - I added a calculation field to the link table that "copies" the image name from the Image table, and then selected "Sort portal records" for the portal to sort by this calculation field - In the portal, I replaced the Image name field from the Image table with the calculation field from the link table - I randomly clicked wherever could, just to see if it made any difference... Everything displays nicely, except that the bugger won't sort. Any ideas would be appreciated - I have attached an example with this post. SortTest.fp7.zip
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.