Jump to content
We've recently updated our Privacy Statement, available here ×

dcodling

Members
  • Posts

    1
  • Joined

  • Last visited

dcodling's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. I need the syntax for a formula with in a variable expression that tests for two main condtions and each main condition has sub condtions. // if sold_to = 'Partner 1' then // if ((qs = 0) or (qd = 0) or ((100 * qs / qd) > 100)) then 0 else (100 * qs / qd) // else if sold_to = 'Partner 2' then // if ((qs = 0) and (kw = 0)) then category value // else if (kw = 0) then 0 else (qs / kw * 100) below code assigns 100 if not partner 1 or 2 instead of testing if KW = 0 Code:$F{SOLD_TO}.equals("Partner 1") ? ($V{EofW_QS}.floatValue() == 0 || $V{EofW_QD}.floatValue() == 0 || (100*$V{EofW_QS}.floatValue())/$V{EofW_QD}.floatValue() > 100) ? new Double(100) : new Double(100.0*$V{EofW_QS}.floatValue()/$V{EofW_QD}.floatValue()): $F{SOLD_TO}.equals("Partner 2") ? ($V{EofW_QS}.floatValue() == 0 && $V{EofW_QW}.floatValue() == 0) ? new Double(100) : $V{EofW_KW}.floatValue()==0 ? new Double(0) : new Double($V{EofW_QS}.floatValue() / $V{EofW_KW}.floatValue() * 100): new Double(100)
×
×
  • Create New...