AnsweredAssumed Answered

How to tell if a given TO is related to the current context?

Question asked by StylisticGambit on Jun 11, 2015
Latest reply on Jul 2, 2015 by StylisticGambit

Title

How to tell if a given TO is related to the current context?

Post

If I’m running a script whose current context is related to a given TO, then I can call for the value of TO::FieldName without issue.

However, if my current context is unrelated to TO, then I can’t call for the value of TO::FieldName without first changing context.

What calculation can I use to determine if TO is related to my current context?

For simplicity’s sake, let’s assume that TO will always and forever have exactly one record, and that all relationships to TO use a cartesian product.

It makes sense to me that some variation of either of the following calculations would work, but neither one does:

If ( EvaluationError ( TO::FieldName ) = 103 ; “unrelated” ; “related” )

If ( IsValidExpression ( TO::FieldName ) ; “related” ; “unrelated” )

Outcomes