Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6035 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Interesting. The repetition of the target field seems to be evaluated outside the context of the portal. It looks like you need to use a script parameter instead.

Posted

BTW: If you set the rep with this calc:

Let( rep = Related::Repetition ; rep )

the rep variable contains the right number, but with this:

Let( $rep = Related::Repetition ; $rep )

the $rep variable contains always 1

WHILE

if you set this calc:

Let ( $data = Related::Data ; $data )

$data contains ALWAYS the right data

So, the final question is:

Why $rep contains always 1 ?

Posted

Why $rep contains always 1 ?

I think that FM haven't time to evaluate...

So the solution is to make a script of two steps:

Set Variable [ $rep; Value: Related::Repetition ]

Set Field [ Main:: Repeating Field [ $rep ] ; Related::Data ]

... and attach that to the button.

SetRepByCalcSolved.fp7.zip

Posted (edited)

If you set the rep with this calc:

Let( rep = Related::Repetition ; rep )

the rep variable contains the right number

I don't see that.

Why $rep contains always 1 ?

I think that FM haven't time to evaluate...

It doesn't always contain 1. It contains the value from the first related record. Because it is evaluated from the context of the parent record, not from the context of the portal row (or at least that's the way it seems) .

So the solution is to make a script of two steps:

Set Variable [ $rep; Value: Related::Repetition ]

Set Field [ Main:: Repeating Field [ $rep ] ; Related::Data ]

Or just one step, if you use the script parameter as suggested.

Another option is to set the repetition to:

GetNthRecord ( Related::Repetition ; Get ( PortalRowNumber ) )

but this will work ONLY IF the portal's sort order is the same as the sort order of the relationship.

Edited by Guest
Removed the part about filtered portal
Posted

I'll tell you for sure when I get one! But I would assume the answer is yes, because the delay is intentional, not due to a processing problem.

BTW, they are not PCed, they are Macs with an Intel processor. :

This topic is 6035 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.