Hello,
i am creating a custom user data extension and adding it as an available field in the flextable / property box.
E.g.
If (Flow Max (Qmax) / Flow Capacity (Qcap)) => 0.7 (70%), then backup = true
OR
I have this output value of Capacity (Flow/Design) but i also would like to have some custom formula which can be exported as T/F. If Flow/Design is more/less/equal to X%, then Y = True/False
If someone can show me how to correctly type the iff formula. Thank you.
The only data type that allows for a formula to be entered is the "Real (Formula)", because it has a data type of "Real" it always has to output a numeric double value. I don't think it's possible to output a boolean data type. You could however use 1 and 0 for true and false. This would get you the following formula: iif(([Flow]/[Design])>=0.7,1,0)
As Joeri pointed out in the above response, you currently cannot generate boolean results like "True" or "False". Try setting "1" for "True" and "0" for "False".
See this wiki for using formula based UDX: Creating Formula-Based User Data Extensions
Additionally see this article which specifically discusses the workaround for such a situation: How do you create IF / THEN / ELSE statements using Formula-derived user data extensions?
Note that an Enhancement request (#188764) for text based output fields has been filed with our development team.
Regards,
Yashodhan Joshi
Just to add - if you really need to have it boolean (true/false), a workaround would be to set it up as 1/0 as Joeri and Yashodhan mentioned, then set up a ModelBuilder connection to a spreadsheet that has a formula to change the 1/0 to true/false. When model results change, click the sync-out button in ModelBuilder, open the spreadsheet and re-save, then perform a sync-in with a separate ModelBuilder run configured to connect that spreadsheet's true/false column to a new boolean User Data Extension to store the true/false.
Jesse DringoliTechnical Support Manager, OpenFlowsBentley Communities Site AdministratorBentley Systems, Inc.