Sunnylew Posted September 17, 2010 Posted September 17, 2010 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?
comment Posted September 17, 2010 Posted September 17, 2010 See: http://fmforums.com/forum/showtopic.php?tid/194897/
Sunnylew Posted September 17, 2010 Author Posted September 17, 2010 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?
Sunnylew Posted September 20, 2010 Author Posted September 20, 2010 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?
comment Posted September 20, 2010 Posted September 20, 2010 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.
Sunnylew Posted September 21, 2010 Author Posted September 21, 2010 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.
comment Posted September 21, 2010 Posted September 21, 2010 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.
Recommended Posts
This topic is 5177 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