Formula for Hierarchy, ToString()?

I have a formula based on a hierarchy and I'm not getting the result I expect.

TransCode is either Buy or Sell. This always evaluates to false. Any suggestions?

Also, is there a way to debug formulas?

if( $TransCode$ == "Sell" )
{
return -1
}
else
{
return 1
}

This should work... at least in the few scenarios I just tried. Can you include a screenshot of the setup?


This looks right to me as well, and was wondering more about it myself.

Defiantly need more info on this. Without giving away your company data (that’s always my issue with screen shoots).

Notice TransCode is Sell on row 1, and the BuySellState equal 1

Notice TransCode is Buy on row 2, and the BuySellState equal 1


Oops! The comparison is Case Sensitive! SELL does not equal Sell

Good to hear to found the solution. That was going to be a hard one to find the answer to with out digging into it more.

Sometimes you need to step away from the issue and come back at it with fresh eyes and asking here helps do that.

You are so right. Thanks for not flaming me for a rookie mistake! lol