AnsweredAssumed Answered

'if ... then ... else' in a AF Formula

Question asked by Chris_Hawkins on Jun 8, 2016
Latest reply on Jun 9, 2016 by dsouzarich

I'm attempting to do what would appear very straightforward but (according my local expertise) may not be doable without recourse to using Af Analtytic or whatever.

By way of exampe I have two attribute in an element. One, |INPUT is an input to an external program (that reads from AF using the AF SDK) the other |OUTPUT is an output from the same external program (that writes to AF usung the AF SDK). Under normal operation the value of |OUTPUT is copied to |INPUT (with a formula in |INPUT of the form A=|OUTPUT.

 

This works fine.

 

However I want to be able to 'break the link' for diagnostic purposes. Of course I could simply delete the formula, except that I have many input/outut relationships. Instead I created a |LOOPBACK attribute and an if ... then ... esle formula.

 

First I tried

if !LOOPBACK == 1 the !INPUT = !OUTPUT

This wouldn't compile so then I tried

if !LOOPBACK == 1 the !INPUT = !OUTPUT else !INPUT

This compiled but on evaluation reported a circular reference for !INPUT. Perfectly reasonable!

Anyway ids there a way to create a formula of the form

if !LOOPBACK == 1 the !INPUT = !OUTPUT else do nothing

????

I have a secondary question that I'll post in another existing 'reletibe paths' thread.

Outcomes