Aussie John Posted July 2, 2004 Posted July 2, 2004 Hi Im looking for a way to calculate the number of records in a portal view. any ideas thanks?
LaRetta Posted July 2, 2004 Posted July 2, 2004 Hi Aussie John, You can count your related records on which the portal is based by using Count(PortalRelationship::ID) Did you need something other than that? In FM7, we can now choose which rows to display. Are your needs something along this line? LaRetta
Lee Smith Posted July 2, 2004 Posted July 2, 2004 I don't have v7, so I don't even know it this is an option anymore. But, in earlier versions of FM, you could use the @@ in the same row as your fields, and it would give you the number for each line in the portal. Lee
Aussie John Posted July 2, 2004 Author Posted July 2, 2004 Thanks folks the Count function works fine, but now I want to be difficult. If out of 7 portal records, 5 have a field with the result "paper" and another 2 with a result "electronic" how can I total just the ones with the "paper" result ( ie end up with 5 as the answer). Its friday and my brain has given up. LaRetta said: Hi Aussie John, Did you need something other than that? In FM7, we can now choose which rows to display. Are your needs something along this line? LaRetta On a different note LaRetta, Id be interested to know how you can display particular rows
RalphL Posted July 2, 2004 Posted July 2, 2004 Some people are never satisified. You will need new relationships based on concatenated fields. In this case the key field & " " & type in the related file and Key field & " Paper" If you wanted electronic it would be Key field & " electronic".
LaRetta Posted July 2, 2004 Posted July 2, 2004 I would think you want to preserve your original relationship to all related records and you would still want to count them all. Then create a global in your main table and attach a Value List based upon field values from your item field (containing paper) in your related table. Then create a second Table Occurence (maybe called Items) and connect to main on: UniqueID = UniqueID AND global = Item Then you will just have one calculation. Place it (and your global) above your portal. Change your count calculation in main to: If(IsEmpty(global); Count(OriginalRelationship::ID); Count(Items::Item)) When the global is empty, all items will be counted. But when you enter paper, only paper will be counted. A Checkbox would let you accumulate your items to count. LaRetta
LaRetta Posted July 2, 2004 Posted July 2, 2004 Sorry John, neglected to respond to your second question ... You can specify the starting row for portals (portal format). Place two portals. First would be Start on row 1, display 1-10. Second portal would be Start on row 11, display 1-10. This works great if you don't need the scroll. Something I haven't tried yet but want to ... if you have 100 records to display and can only use two portals with 25 rows each, you need the scroll. If so, the first portal could scroll PAST the number 25 - and then both portals would be displaying the same records. I believe there is a way to limit the Table Occurence to the RecordNumber. So you would create a TO called Portal 1 and one called Portal 2, specifying the total number of records to display in each portal. Again, I haven't had time to play with this idea. Limiting records (without scroll) works very well if you know the total record count (so you won't have records possibly undisplayed). LaRetta
Recommended Posts
This topic is 7518 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 accountSign in
Already have an account? Sign in here.
Sign In Now