Jump to content
Server Maintenance This Week. ×

Views in Filemaker?


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

Recommended Posts

I haven't seen any specific reference to "views" anywhere in Filemaker. Perhaps this is ancient parlance for something that is done differently in FM? FM uses the word "view" in terms of layout - I mean a "view" of the data which is a superset or subset of the table records.

I need to create a relationship with child records using a key field PLUS a constant. For instance (tho this is not my application), in a sales order, the relationship with the order line items is defined by order number PLUS the line item status (A=active, V=void) so that I see only the active line items.

I can see how to do this if I create an extra field in the parent, and set it to "A", but is there a more elegant way to achieve this?

Link to comment
Share on other sites

I can see how to do this if I create an extra field in the parent, and set it to "A", but is there a more elegant way to achieve this?

Unfortunately not, however if you use an unstored calculation and set the result to "A", at least then no additional data is stored.

Link to comment
Share on other sites

FileMaker does not have "views" in the terms that you are thinking. Yes in order to filter a relationship you will have to "muddy" up your schema by adding a field with the "A" to your parent table and using a multi-predicate relationship.

However...

Another alternative.... depending on how you "create / edit" your children records (if it is thoroughly scripted) I have in my line item table a foreign key field that is based on "type or view" so that you could link by pkID to fkID_TypeA for one set of records and then another relationship for pkID = fkID_TypeB for the other value.

Thus only requiring you to add another index field in the child table - and if I want to link to all children records I would create a concatenated calculation between the two foreign key fields as only ONE will ever contain data and then us it as a field tied to the pkID in the parent table.

Again if this is for display purposes and you have creation of related records managed by scripts there is a way to use a global field in the parent file to toggle between ALL / Active / Void types of records in the child table. thru your portal.

In your child table you could create a calculation that is "all¶"&statusField and in your parent table a global text field that is a popup or radio box of "All / Active / Void". Then your relationship between the tables would be ID to fID and gStatus to Status.

Hope that helps

SD

Link to comment
Share on other sites

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