December 29, 200718 yr Does anyone know how to generate a list of source tables (not table occurances), exactly what you see when you go to: Define databases window >> "Fields" tab >> "Table" field dropdown list? I find that when using the "TableNames ( fileName )" function, that it lists all occurances. Again, I would like to see just the root table names.
December 29, 200718 yr Can you enlighten us where such request makes sense? I've noticed that Applescript sees it the same way ... this could mean that some of the TO's of the same table behaves different according to the setting of evaluation context ... when attempting to write data to it. Some might even be faster??? Judging from the DDR should a XML method exist to nail this aspect, but I have never yet found the urge to delve into this yet! --sd
December 29, 200718 yr Happy to see that I'm not the only one feeling the need of a Get ( SourceTable ) function. Fundamentally, FileMaker ignores the real database stucture and provides functions to get only the metaphore names such as table occurrences. With fields, at least, you have Get ( ActiveFieldName ), FieldNames () and GetLayoutObjectAttribute ( x ; "source" ), but nothing at all for tables. As files are concerned, there is simply no way you can get information on related file names or even file references. With a strict naming convention though, you can do pretty much make it for tables. At BH&A, we name all our table occurrences with something that let us identify the source table. (we have a 3-6 chars table identifier, and it is followed by two underscores in the TO names). Another thing you can do (we do it as well) is to have a calculation field in each table, with the table name.
December 29, 200718 yr Happy to see that I'm not the only one feeling the need of a Get ( SourceTable ) function Explain why you find a need to have it?? I'm fully with you that naming conventions will let you filter on the returned list, and by it achieve the required precision. But just requiring a function, because it could be nice to have, but have no actual context and purpose to be thrown after would confuse more than the omission. Please relieve me from blatant ignorance! --sd
December 29, 200718 yr LOL ! well, I really miss it everyday ! For example, I try to avoid passing 'obvious' parameters to scripts. So I would like the script to be able to know what the current context relates to (if we are on table A, do this, on table B, do that...) This way, most "parameters" can be gotten (get, got ?) from the script instead of passed to it. As I said earlier, a good naming convention does it. I have a function, GetTableXXX ( TO ), that I use in almost every script, making them much more portable. Edited December 29, 200718 yr by Guest
December 30, 200718 yr Author I simply want to build a checklist of filenames and their respective tables to place in my developers database. This makes it easier to track the progress of tasks and subtasks behind solution wide improvement projects I have to accomplish. Besides "TableNames ( fileName )" should return table names based on its name. Maybe they should have called it"TableOccurances( fileName )" I found the same incongruence with "Get Active Layout Ojbect Name". It doesn't return tab names yet you can give a tab an object name. You can even use "Go to Object" to go to the tab.
December 30, 200718 yr But Fabrice you're never on a table only, but always on a table occurrence and by it a layout. This means you'll get all you need by: http://www.filemaker.com/help/FunctionsRef-242.html Which is crafty exploited here: http://web.mac.com/zueiv/iWeb/FileMaker/Script%20Killing%20Techniques/AFA363C6-2D85-4C6D-82E2-273F3722A69E.html Further more could his setting of variables perhaps in some cases benefit from this: http://www.fmforums.com/forum/showpost.php?post/187787/ Plus you could make the two variable values in Zueiv's autoenter values instead of setting them via the script. The autoenter could be conditional by asking which script attempted to create the record: http://www.filemaker.com/help/FunctionsRef-262.html --sd
December 30, 200718 yr This makes it easier to track the progress of tasks and subtasks behind solution wide improvement projects I have to accomplish. This will probably show up if you run this: http://diffxml.sourceforge.net/ ...against the previous DDR - not that I've tried it at all. But it just occured to me. But this seems to do it: http://www.fmdiff.com/ --sd
December 30, 200718 yr Søren, thank you for your aknowledgment of Get ( LayoutTableName ), but I thinnk I habe used it quite a lot, in GetTableXXX ( _TO ) for example. Then what ? do you have only 1 TO per table ? I'm using the Anchors & Buyos architecture, but I never understood why some would refuse to have several anchors for the same table. This has nothing to do with A/B in my opinion. So if you have several TOs, Get ( LayoutTableName ) isn't helpfull, since I have to script : If [ Get ( LayoutTableName ) = this or Get ( LayoutTableName ) = that... ] Go to layout Do things Go to layout [original] End If where I'd like If [ Get ( SourceTable ) = this ] ...
December 30, 200718 yr Get ( LayoutTableName ) = this or Get ( LayoutTableName ) = that... http://www.filemaker.com/help/FunctionsRef-370.html or... http://www.filemaker.com/help/FunctionsRef-371.html ...comes to mind as better options! I wonder how you would interpret Ugo's test here: http://www.nabble.com/Re%3A-Under-utilization-of-the-context-drop-down-p14210821.html It seems like there's a price to pay when solely looking at the base table behind it, you should definately select an appropriate one to execute your script in anyway. --sd
Create an account or sign in to comment