Firstly the ability to use Indirection restricts what references are generated for any item, and so that limits your access. But be aware that there are lots of places that items can be used outside of the list of possible references, as well as reasons why the reference count is incomplete. The Unreferenced checkbox is a very useful tool for cleaning up a solution that has lots of items that are no longer being used. Unreferenced isn't the same as "Safe to Delete" Don't delete Fields or Custom Functions in a solution when there are calculation errors, and always test your solution before going live after you've deleted items. Secondly be aware of the Unreferenced and Indirection checkboxes and don't delete items without being aware of where they may also be used. You can also use naming conventions to mark the items that are being used Indirectly as a warning to not delete or rename them. Use Indirection where needed and keep track of the sorts of things you're using it for. The ability to Indirectly refer to things is powerful and steps like SetFieldbyName can reduce complexity on a massive scale. In the later versions of FileMaker you even have options like GetFieldName which allow you to use the item directly and also refer to it by name, so your reference counts will still be included. Instead of trying to parse out individual item references, BaseElements keeps track of which items may be using indirection and of what type and lets you make decisions about how this will affect your solution.įirstly, to make your life easier, use Indirection sparingly. We could build in a simple case solution that found some of these, but we've taken the decision that we'd prefer not to have a solution that only works half the time and where you would never be sure which half it was being accurate with. The reason for this is that there are just too many possibilities with the complex options for us to decide which items are being referred to at run time. ![]() So GetField ( "Text" & $Variable ) is an equally valid calculation, and the variable data may come from a text field or dialog that the user selects.īaseElements builds it's list of Indirection functions from any function call that allows you to select a Layout, Field, or Value List or any function where you can include entire calculations that may also refer to Custom Functions.īaseElements doesn't try to distinguish between the simple cases such as GetField ( "TextFieldName" ) where it's quite obvious to the user what the field is, and more complex cases such as GetField ( "Text" & $Variable ) where the resulting field(s) may be unknown to the user. For example you can use GetField ( "TextFieldName" ) and if you change the name of the field from "TextFieldName" to "ChangedField", without updating all of the places you're using this in calculations, your code will no longer work.Īs well as that your calculations can be completely dynamic, and build the fieldname from user data. Newer versions of FileMaker have introduced lots of ways of referring to items by their name instead of via this internal ID, and so there now exists the ability to change a name of something and break a calculation. This ability doesn't exist in many other programming languages and makes life much easier for long term administration of a solution where you can alter items at will and not break your entire solution. Ordinarily when you build a calculation and use fields or custom functions by name in the calculation, FileMaker links those names to the internal id of the item, and in that way you can close the calculation, change the name of the referenced items, and the calculation will update to match the new names. ![]() Indirection in FileMaker is the ability to refer to items "Indirectly". ![]() In lots of element types, there is also the possibility that the solution is using Indirection and so the element might be still used, even though it's listed as "Unreferenced". In that case the item isn't being referenced directly but may be in use by the user when invoked manually from the menus that display the item. One exception to Unreferenced is when the item is a Layout that is set to show in the Layouts menu, or a Script set to show in the Scripts menu. In list layouts this may appear with the label "U" where there isn't enough room to show the full name. BaseElements will build a list of all of the places that an item is in used, and when there are no references for any one item it marks them as "Unreferenced" and show this on the "Referenced By" tab.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |