8 Replies Latest reply on Jan 4, 2010 10:27 AM by jla_1

# Help with find calculation

### Title

Help with find calculation

### Post

I have a set of records (images), each one is tied to another table via an id (student id) so that on the master layout each student has a portal record that displays their two images.  Each id has exactly two images that are related.  I need to create a found set with just the second related image.  I tried a checkbox with each student record (portal for images) that allows the second image to be selected-then found on that, but it's extremely tedious with thousands of images.  Would (get)portalrownumber be something I would use?  Thanks.

• ###### 1. Re: Help with find calculation

Is there anything in the Images table that makes the second image second - other than creation order? Do you have any sort order specified for the relationship or the portal?

jla wrote:
I need to create a found set with just the second related image.

Do you mean a found set of ALL second images, or one image for the current student?

• ###### 2. Re: Help with find calculation

The second image is listed by default sort order.  I'ts a numeric .jpg such as 234.jpg, 235.jpg so it defaults to the second row of the portal.  All the second images of each students are identifiers, so while they are the same, they are unique to each student.

I need a found set of each student with just the second image, so that browsing through each student record of the found set displays only that second image.

Thanks.

• ###### 3. Re: Help with find calculation

jla wrote:

I need a found set of each student with just the second image, so that browsing through each student record of the found set displays only that second image.

That's not very clear - do you mean you browse student records and you want to switch to a layout of Images with the second image of the current student being the only record in the found set?

If so, there are so many ways to do this I don't know where to begin - perhaps you could explain the purpose behind this?

• ###### 4. Re: Help with find calculation

Well, the ultimate goal is to be able to export a list of students as a text file and the associated second image (prior posts here helped me with that).  Since there's thousands of images, by being able to do a find on just the second image, when the export is done it will create a text file with:  name, id, secondimage.jpg  - followed by a folder with the actual images (second only).  I am able to do this currently using a checkbox and a scripted find but checkboxing thousands of records one by one is not practical.  I probably should have stated that earlier, browsing the found set can be done from the images table layout and is only the precursor to the export.

• ###### 5. Re: Help with find calculation

You could define a calculation field in the Students table =

GetNthRecord ( Images::ImageName ; 2 )

and use it for exporting the list.

You could probably do the same thing with the image itself - but note that there's no batch exporting of images.

Another option is to go to Images, show all records, sort by StudentID and omit every odd record. If you need to do this often, perhaps you ahould mark the images permanently as odd/even - it seems that the second image is somehow special and deserves a field saying so.

• ###### 6. Re: Help with find calculation
Thanks, that gave me a good direction to start with.  Could you give me an example of how to omit the second record?
• ###### 7. Re: Help with find calculation
Go to Record [ First ]
Loop
Omit Record
Go to Record [ Next; Exit after last ]
End Loop

• ###### 8. Re: Help with find calculation
Thank You