June 8, 20169 yr I use a filtered portal to display a subset of content from a table. Everything works fine and when I click on a portal entry, I have no problem fetching the corresponding table entry ID and then displaying related content from the specific entry. All that is good. The problem is that I have a script that needs to get the ID for the first entry in the current results. I've tried different ways, but none will return that first ID ... even though I "go to object" ... first the portal name and then the field name. Usually the ID that's returned is the first for the table, as if the portal filter is being ignored. I certainly don't want to build in a duplicate Find operation when the correct entry is right there on the screen! How can my script get the entry? Thanks in advance for any assistance.
June 8, 20169 yr 43 minutes ago, K1200 said: Usually the ID that's returned is the first for the table, as if the portal filter is being ignored. If you are in a portal row, then the expression PortalTable::Field returns the value from the record in the active portal row. It doesn't matter if the portal is filtered or not. Note that you do not need the ID in order to go to the related record - if that's what you're after.
June 8, 20169 yr Author Thanks for your reply. It led me to retrace my script steps for the Nth time. As I mentioned, I was going to object (portal, by name, and then field) and then setting a parameter with the current ID. As something to try, I inserted a Go to Portal Row[first] ... and voila!, it fetched the current first ID. Apparently, going to object doesn't home in on any current content. I never realized that. Onward!
June 9, 20169 yr 7 hours ago, K1200 said: I was going to object (portal, by name, and then field) Probably not. Going to portal alone does not select a portal row - as you can see if you do: Go to Object [ "yourPortalName" ] Show Custom Dialog [ Get ( ActivePortalRowNumber ) ] But if you do: Go to Object [ "yourPortalName" ] Go to Field [ PortalTable::FieldInPortal ] Show Custom Dialog [ Get ( ActivePortalRowNumber ) ] you will be in the first row of your portal. Edited June 9, 20169 yr by comment
Create an account or sign in to comment