AnsweredAssumed Answered

Quick way to count number of 'valid' portals?

Question asked by Abingdon on Jan 13, 2016
Latest reply on Jan 13, 2016 by Abingdon

I have a layout with 5 portals on it, each showing 3 records, all from the same relationship.  Portal one shows records 1-3, portal two shows records 3-4 etc. etc.  That gives me a maximum of 18 records that may be showing in the portals at any one time.


I need to be able to set a variable with the total number of portal records that are being shown.  E.g., if portals one and two re 'full' that gives me 6 records, if only 2 rows of portal three have data in them then that gives me a total of 8 records being shown via the portals.  There may be more than 18 records able to be shown at any one time but I need to know how many are actually being shown via the portals (not the total number of related records)


Short of scripting a visit to each portal row and seeing if it's got any data in it, Is there a 'fast' way to do this?


Basically, it's a product image database.  A product type may have any number of images associated with it. A user selects the product type and the portals show the associated product images.  If there are more than 18 product images, the user can click a 'next' button which loads the next set of images.  Could be another 18 or, say, only the remaining 5.  I need to make the 'next' button invisible if there are not any more images to load.  Hence the need to count the number of images left to view.


I can calculate the total number of images available for any selected product; it's the 'counting up' of images left to view that I am having a problem with.


Trust this makes sense and thank you as always.