AlteryxFormulaAddOns icon indicating copy to clipboard operation
AlteryxFormulaAddOns copied to clipboard

Vartext inconsistent behavior in IF statements and conditional assignment

Open Cassandra-Clark opened this issue 6 years ago • 3 comments

I've attached a file with four different test cases but each of these has some strange inconsistencies with variable setting that seem to evaluate before returning... somehow?

I tried to comment each of them with what was expected.

vartext_testcases.zip

Cassandra-Clark avatar Nov 17 '18 14:11 Cassandra-Clark

Attached another example of out of sequence processing

varnum_outofsequenceprocessing.zip

Cassandra-Clark avatar Nov 17 '18 14:11 Cassandra-Clark

The cause is the formula parser running. Unfortunately not sure I can determine in parse stage as opposed to run stage.

I have added some new diagnostic functions into the library:

  • VarTextExists / VarNumExists - check if a variable is defined
  • VarList - writes all variables out as a string in a tab-delimited table
  • VarReset - deletes the entire variable set
  • Log - allows you to write a log message to a file as part of a formula evaluation

I will attach tweaked versions of your test

jdunkerley avatar Nov 18 '18 09:11 jdunkerley

Added examples as part of 1.4.0.1 test suite

jdunkerley avatar Nov 18 '18 17:11 jdunkerley