hexagon logo

IF statements with Tracefields

I want to write an IF statement that looks at the string value in a Tracefield called TYPE, where an option is FINAL PRODUCT AUDIT. If the TYPE = FINAL PRODUCT AUDIT, I want to bring up a comment "C2" that asks the user what the heat lot number is, and then continue on with the program. How can I do this?



I figure it would be something close to this:

IF (TYPE == "FINAL PRODUCT AUDIT")
THEN
C2= COMMENT/INPUT
HEAT LOT
ELSE ()
Parents
  • I have had some consistency issues going directly from the tracefield to the IF statement. Sometimes the value would pass-through and other times it would be ignored. To work around this, I assigned each tracefield value to a variable ahead of the IF statement. YMMV.


    Isn't that what's shown in my screenshot?

    ASSIGN/TYPE=GETTRACEVALUE("TYPE")

    Or is this something else?
Reply
  • I have had some consistency issues going directly from the tracefield to the IF statement. Sometimes the value would pass-through and other times it would be ignored. To work around this, I assigned each tracefield value to a variable ahead of the IF statement. YMMV.


    Isn't that what's shown in my screenshot?

    ASSIGN/TYPE=GETTRACEVALUE("TYPE")

    Or is this something else?
Children