SetVar not working in sell rules?

P123 Team
I can’t get SetVar working in sell rules. Is that correct?

Thanks.

Georg - Sorry for jumping in. I know you are addressing P123 and they may have something to add. I had it working several years ago but it is possible that something has changed. A couple of tips:
(1) You have to specifically define the SetVar as a sell rule. Don’t depend on definitions from Buy rules
(2) The SetVar() will trigger a sell. To get around this, you have to AND the function call with FALSE as shown below:

SetVar(@Var, …) & FALSE

Steve, thank you for this info.
It works with SetVar(@Var, …) & FALSE

Perhaps P123 can document this in the description of SetVar, otherwise how would the unsuspecting user know this.

1 Like

P123 You should document this in the Factor Reference "Set Variable" description. This is from 4 years ago, but the description has no mention how to use this in sell rules.

I've added a note in the Use Cases section covering this behavior.

Thank you. It took me about 1/2 hour to find this posting again.
Maybe P123 should consider a Wikipedia type of Reference which can be edited by users as well.