I'm trying to obtain a result from a field in the first row of a portal by using a calculation.
Can anyone point me in the right direction?
If the result is visible in the first row of the portal, you may not need a calculation, just use the original field outside the portal or create a simple calculation which equals that field. Just remember that if anything changes, like the relationship or portal sort order, the first record may change and the result will be different. Start by taking a copy of the field and paste it onto the layout outside the portal.
A relationship will always show the first record visible in that relationship based on the sort order assigned in the relationship diagram. If there is no sort order, it will show by creation order.
You don't say if you are using a script for this, but if you are you can use the goto portal row first script step.
Assuming the portal is not sorted you could use:
GetNthRecord( fieldName ; 1 )
stratlake wrote: I'm trying to obtain a result from a field in the first row of a portal by using a calculation.
You should explain your purpose here. If you are trying to get data from the first related record (in the sort order of the relationship) then use simply =
This takes place at the data level; a portal is not involved or even required.
Thanks for your help everyone. I should have probably put more detail in however I was looking for Invoice start and finish dates, as the invoice was for hire items. I found that I could do a MAX(Table::Field) to get the latest date which solved my problem.
Thanks for all who posted
Retrieving data ...