Jump to content

Adding Additonal Subsummary Part & Calc?


stealth162

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

Recommended Posts

I have a database consisting of many records and layouts. One of my layouts that I use for printing has a subsummary part. Each Record in the database has a number ie; 1m1, 1m3, 2m1, 2m2. When I go to this layout for printing which has the subsummary part it puts a heading over the records in that series. ie; Group 1: followed by records 1m1, 1m2; Group 2: followed by records 2m1,2m2. The group number is derived from the first number of the record.

What I'd like to do is add another piece of data to that sub summary. For each group there is a version number that the user manually enters on a different layout. I'd like to have a calc that reads which group number is in the sub summary and then displays the corresponding version next to it.

I'm new to filemaker. Not sure if this is really simple or quite difficult. I'm guessing the previous and just that I don't know how.

Link to comment
Share on other sites

So I have made a little headway on my own...I think. I created a new field called "Reel Versions" and put the following calc into it:

Case ( Reel = 1 ; Reel 1 Version ;

Reel = 2 ; Reel 2 Version ;

Reel = 3 ; Reel 3 Version ;

Reel = 4 ; Reel 4 Version ;

Reel = 5 ; Reel 5 Version ;

Reel = 6 ; Reel 6 Version ;

Reel = 7 ; Reel 7 Version ;

Reel = 8 ; Reel 8 Version ;

Reel = 9 ; Reel 9 Version ;

Reel = 10 ; Reel 10 Version ;

"none" )

The idea is that it reads the number that is already retrieved and displayed in the subsummary part. (ie; Reel Number). So in theory it would read that number and then if it equals a number (1-10) that new field will display the appropriate version in the subsummary part. With the calc as it is I am able to retrieve the version for the first Reel (or group of records) then when it goes on to Reel 2 and 3 etc. it retrieves nothing.

Anyone know what I'm missing?

Link to comment
Share on other sites

Case( Reel >= 1 and Reel <= 10; GetField("Reel " & Reel & " Version"); "none" )

should work also, as long as the calculation is unstored. Have you verified that Reel does contain data for each record? Are there any repeating fields involved?

Link to comment
Share on other sites

Hey stealth,

Ok I saw your file and you need to create a new table (Versions). That table will have two fields. One will be reelNum and the other should be VersionNum.

You then should create a new realtionship with the matching keys to be "reel" and table Version "reelNum". make sure that you check "allow creation of records for the Versions table.

Then put the field Version::VersionNum on the layout and it should work.

You do not need the following fields:

Reel Versions (calculation field)

Reel 1 Version...Version 10

If you havent read the tutorial about relational databases yet, then I suggest that you do. It should help you a lot.

Good luck.

Link to comment
Share on other sites

Is there any particular reason you have the user entering the VersionNum on the home page instead of where the user enters all the other information?

Link to comment
Share on other sites

Yes. It is because the version number refers to that group of records. ie; The reel version applies to all the cues in reel 1. Currently the Reel number in the sub summary is derived from the first number of each cue/record. It displays that number in the sub summary as the reel number and changes as soon as it sees a record with a different number (ie 2m01) and then displays Reel 2 with all the 2m* records following it and so on.

Link to comment
Share on other sites

Take a look at this and see if its what you are looking for.

Its ugly and rough, but its just a quick mockup.

If worse comes to worse, and you want the user to enter it into a key you can have a popup etc but its weems to me that a user should be able to enter the versionNum without a problem.

test.zip

Link to comment
Share on other sites

That is deffinetely heading in the right direction. The only thing is that the user shouldn't be able to edit the Reel Number ( I don't want to mess up anything by a possible user putting in an invalid number). The reels will always be fixed numbers from 1-10. Sometimes only 5 or 6 will be used but that is another issue. It will never exceed 10 reels.

The other things is that you made a new layout for your entry. Was that just to keep things simple. Is there any problem with putting that into my 'main menu' page?

Link to comment
Share on other sites

I didnt create the other layout, "test". It is created automatically when you create a new table. If you want, you can hide this layout from the user. The user will not touch the reel numbers. The user should enter the data in the VersionNum field (see the Quick view layout). Once the user enters that data, it will create it automatically based on the original reel field. The table that you see in layout test does not have to be used. Its just used for your own development purposes.

The reason it poses a problem to put it into your main menu page is because since your main menu layout is actually a layout for the table "GG Spottting Temp 1 copy Converted" depending on what record your user is on, the primary key will be different for the realtionship. Also, its just easier to put it with the rest of where the user will be entering the data anyway.

Good luck.

Link to comment
Share on other sites

The only problem with your solution is that I don't want that reel version number to be on each record. I wanted to have one place the user enters the version and then it is there available for printing reports. With that number on each record it gets confusing and makes the user think he can enter a different number for each record but, you can't cause they are obviously linked by the first number in the cue. Why is it that the template I posted originally works for the first series (Reel 1) and not the others. That is all I want to achieve here. I don't want to add any data to the individual records.

Link to comment
Share on other sites

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