AnsweredAssumed Answered

Converting Record type to text or text to Record ?

Question asked by VRFuser on Apr 16, 1997
Mike,
I believe the following will work if you use a formula in an
IF/THEN/ELSE object. In this example, the "B" input pin of the
IF/THEN/ELSE has been renamed "Rec" (you may name the pin any thing you
want, using the A.B syntax, the expression to the left of the dot is the
pin name and the expression to the right is the name of the record
field). This also assumes myField is a text scalar.

                       +---------------------------+
+------+               |     IF/THEN/ELSE          |
| TEXT |               +---------------------------+
+------+---------------| A |                | THEN |
|abcdef|               |---| A==Rec.myField |------+
+------+            ---|Rec|                | ELSE +
                    |  +---+----------------+------+
+----------------+  |
|     RECORD     |  |
+----------------+  |
|myField| abcdef |---
+----------------+



Gustin, Mike wrote:
>
> Hi Everyone,
>
> I am trying to compare a text string with a record text string to see if
> they are equal, using the relational operator == . When I do this I get an
> error message "Unable to convert text to record"  or "Unable to convert
> record to text" depending on how I hook it up.
>
> I have tried using "Get Field" and the A.B syntax in relational expression
> to extract the field back as text but it does not work.
>
> Mike Gustin
> mgustin@sme.siemens.com

Outcomes