I want to hide a field if it's the top row of a portal, is there some way to identify the top row of a portal? I tried to hide it if "Get (RecordNumber) = 1" but that hides all of them.
Use the field with the primary key to find the first item of the list displayed in the portal. In this example the field is called "id":
Let (
~firstID = LeftValues ( List ( portaltable::id ) ; 1 ) ;
portaltable::id & ¶ = ~firstID
)
2 Likes
Solved. Thank you!
1 Like
I wonder if GetNthRecord would be faster than getting the entire list and then using LeftValues?
Something like this:
Let (
firstID = GetNthRecord( portaltable::id ; 1 ) ;
id = firstID
)
1 Like
the fasted "should be" PortalTable::MyUnstoredRecNum = 1 where
MyUnstoredRecNum := Get ( RecordNumber ) as an unstored calc in the PortalTable
3 Likes
same way (for fast performance) I needed the last portal and I used an unstored number field get(foundcount)) and the condition for hide or whatever is PortalTable::MyUnstoredRecNum =PortalTable::foundcount
1 Like
Let (
firstID = GetNthRecord( portaltable::id ; 1 ) ;
portaltable::id = firstID
)
This way it works without extra field in the PortalTable. Great!