without seeing the contents of the scripts, it's hard to tell. One thing you may try is to Refresh the portal after moving to a different row for example. Portal most of the time needs to be refreshed by using for example Refresh Object().
Currently the scripts attached to the navigation objects are in the following format:
If(Get(ScriptParameter) = "first"
Go to Object (Object Name = "imagePortal"
Go to Portal Row [Select, First]
Tried adding the Refresh Object line, but this seems to have no effect.
1 of 1 people found this helpful
I don't think portal row is the way to go, since the portal has only one row. Portal filtering will work, however. Try this:
1. Create a global field called, say, rowSelected which you will use to filter the portal
2. Set the portal filter to: yourTableName::rowSelected = yourDataTable::recordID
3. Create the following script—
Set Variable [ $thisRow ; Value: yourDataTable::recordID ]
Set Field [ yourTableName::rowSelected ; $thisRow ]
Refresh Window [ Flush cached join results ; Flush cached external data ]
Exit Script [ ]
4. Create a button placed within the row of your second portal (i.e. the one that shows all records) that runs this script. As the script is running from the context of a portal row, it will select the recoded of the row it is on. The relevant image will then show in the filtered portal.
This is not a direct answer to your specific question but may produce the effect you're after. Try the script step "New Window" and specify that you want the window to open up in a Form View layout from the child table (that is, the one whose container field is currently being displayed in your portal). You'll see one record from that table, and you can page thru those records 1 at a time while your slide-show window "floats" above the rest of your desktop. Be sure you specify the ability to close that floating window as one of your options; you may want that layout to have a button clearly labelled to do just that.
You also asked about how to display the total number of records in the portal. Within your parent table, create a Calculation field using the Count function, as in "Count ( Child::One )" (in which the field "One" is itself a Calculation field in the Child table, with Number result = 1).
Note that, using the floating window described above, you can simply display "Get ( RecordNumber )" and "Get ( FoundCount )" for the Child table itself.
Start from bottom. You can create a field that show Count(RelantionshipForPortal::ID_FIeldName) that will show you number of records in your portal.
As you wrote, you need be in the portal to be able to navigate up and down.
Here is a mixed approach, (based on previous answers) that will permit the use of buttons to display the record that you want, without taking care if your portal is active or sleeping...
1. Create the filter suggested by Keywords (Steps 1 and 2)
2. Create PortalRecordNumber as a calculation field suggested by Richard Russell using the Count function
3. Create a list with your child record id's
4. Create a position field in the parent table to use as RowSelected in Keywords example to filter the record to display
5. Use position = 1 for first portal record, position +1 for next, position -1 for previous, and PortalRecord Number for last.
I have the same problem that you, so I will try it now
What I did was:
1. Add a second relationship between parent and child tables: filter = photo_record_id, instead of using the portal filter, to get a faster response while using FM Server
2. In parent table create 2 fields: the filter mentioned above and a second with the list of (photo_record_id's)
3. In a separate table (like Preferences) create Pointer as a global field that "on open" sets itself to 1
4. Create your button bar with your 4 buttons, each one calling a Photo Navigation script using one single number as the parameter of each segment. I use 1 for first, 2 for previous, 3 was for delete (not used) , 4 for next, and 5 for last.
5. Create a script that uses 3 variables: total records in your list, original position of the pointer and the button input parameter to generate the new position of the pointer, according to each button
6. The new position is used to get the id of the record that you want to show using getvalue (list, pointer)
7. You end updating the pointer, to be used in the following click
Now... time to learn some spanish... not that hard
8. The script has to take care of navigating within the boundaries of your list
For the statement on row 12, this is how it goes
I hope you can take advantage of it
It's also possible to set up a three panel slide control with script triggers on the control such that moving from the middle panel (which displays the image) brings up the next or previous image depending on whether you move to the first (left) or last (right) panel.
This is a bit of a "smoke and mirrors" trick, but it can be especially nice for thumbnails in a touch interface where you can swipe to move from panel to panel.
Phil! Is it really you? Are you truly back? Omigod, we've missed you!
Well my previous involvement had become such a major obsession that I had to take a break to get some perspective.
Then, once I was out, it was hard to jump back in.
Sent from my iPhone
Thanks to everyone for the answers. I used an approach based on the approach Alejandro suggested and it is working well. Appreciate everyone in the community sharing your insights!