How do I copy data from a Portal to a Field?

I have a layout which consists of a portal to related records. I've duplicated the portal and listed only a summary field to show the totals of those related records (so far, so good).

But I'd like to "capture" the value of that summary field by copying it into a field on the layout (outside the portal).

How do I accomplish that?

Is this a filtered portal? You need a relationship that retrieves exactly the records you see in the portal. With the Sum() function, you can then copy the result for further calculations.

Jan

name the field object "total" and set a variable the value : GetLayoutObjectAttribute ( "total" ; "content" )

1 Like

Set Field [“mileageExpenses” ; relatedTable::summaryField]

I agree, we need to be in the context of that portal, and you're suggestion works perfectly well, and is simpler to implement.

Select Object ["mileage expenses  portal"]
Go to Portal Row [ ]
Set Field [“mileageExpenses” ; relatedTable::summaryField]
1 Like

I don't think this will that the portal filter into account

1 Like

Summary fields and filtered portals play nice now, though it wasn't always the case. @Malcolm has the solution - just do your set field form the portal context and it will summarise visible (filtered) values only.

Sum() is a relationship-level function which will deliver a different result for a filtered portal.

1 Like