Can a user data extension with an IF, THEN, ELSE (iif) statement assign a value to another field?

Product(s): WaterGEMS, WaterCAD, HAMMER, SewerGEMS, StormCAD, SewerCAD, CivilStorm, PondPack
Version(s): 08.11.XX.XX and 10.00.XX.XX
Area: Calculations

Problem

Can a user data extension with an IF, THEN, ELSE (iif) statement assign a value to another field?

For example, the statement below would result in the following error.

iif( [DerivedNodeResults_StructureDepth; Feet] >=10, [CircularStructureType_Diameter; Feet] =4, [CircularStructureType_Diameter; Feet] =3)

Error: "User Data Extension Problem: Error found in provided expression. Details: Incompatible returned data-type from this expression with respect to the one expected."

Solution

The "iif" statement can be used in a user data extension to report values. Then those values can be copied and pasted to the desired input field using a FlexTable.

For the example above, the following statement could be used.

iif( [DerivedNodeResults_StructureDepth; Feet] >=10, 4, 3)

Then those values could be selected in the element's FlexTable, copied, then pasted into another field.

See Also

How do you create an IF / THEN / ELSE statements using Formula derived user data extensions?

Copy and paste (import or export) tabular data

Query, alert or formula UDX not working correctly with "=" (equals)

Recommended
Related