September 17, 201015 yr I've had a search, but am not sure exactly what search terms to use for my problem.I'm sure this will not be the first time it's come up, and the answer may be glaringly obvious. I have a photo database. In my layout there is a large central copy of the photo surrounded by relevant details - date, place, notes, people in the photo. There is also a portal which shows related photos in that set. On the other side there is a portal which shows all photos arranged by date. Scroll up and down to select the photograph you want to see, click on the portal thumbnail and that record is gone to. My problem is that there are over 800 photographs, and every time you go to a new record the portal resets itself to the first row. I've tried scripting it to grab the active portal row as a variable and then go to that variable every time a new record is called, and this works reasonably well, but the "AllPhotos" Portal does not need to be active to change records, and when this happens, it scrolls back to the last selected photo in the portal which could have been ten minutes ago after quite some time finding the new photo. Is there some Get(TopVisiblePortalRow) calculation or something that could sort out this problem?
September 17, 201015 yr Author Thankyou, Would you believe I solved it just before reading your post - I got rid of all the scripts I had kept building on and started from scratch. I have one script that gets the variable when I click the portal row (triggered by a button which is the photo) to go to related record. And part of my on record load script sorts out the portal. It doesn't work in iwp, though. I thought this solution would work as it relies in scripts throughout - the only user interaction is the button click which works in all other ways. Does anyone have any suggestions?
September 20, 201015 yr Author I realised that your solution was far more elegant, and have adapted my database to function using the relationships as in the earlier post. Not only was scripting cumbersome, but of course as I said earlier, it would not work in iwp. With the new setup, however, the portal still returns to the first record every time. Do portals still reset in iwp automatically as they used to in normal filemaker?
September 20, 201015 yr I don't know much about IWP. I tried this and I see the same thing - the "portal" resets the scroll upon selection. If a scripted Go to Portal Row works for you, you should try adding this to the button action.
September 21, 201015 yr Author Hi Comment, Thanks for your hep. The script doesn't work either, but to tell you the truth I'm just happy it works so well now on my own computer, as I'm the one who'll be using it most. It's only family members who are looking at the site, so they'll be fairly forgiving, I hope.
September 21, 201015 yr It's only family members who are looking at the site, so they'll be fairly forgiving, I hope. Ah, it that what it's about? Perhaps something like this would better suit your purpose: http://fmforums.com/forum/showpost.php?post/201804/ Note: The script needs to be adjusted slightly to make it compatible with IWP, but it will work. And with a small effort, you could turn this into a "gallery" type of view.
Create an account or sign in to comment