Forum Discussion

CurtisMiddleton's avatar
CurtisMiddleton
Qrew Trainee
5 years ago
Solved

Formula Not Functioning as Expected

Hi, Can someone please help me with the following formula. I have comments under each line as to what it should be doing, but it is not doing that. It is just displaying zero. If([Spent By]=ToUs...
  • EverettPatterso's avatar
    5 years ago
    Try this one

    If(UserToName([Spent By], "FF")="John Doe" and [Shared Purchase?]=true, [Amount]/2,
    //If user is John Doe and Checkbox is checked, display the amount divided by two, otherwise execute next if statement.
    
    UserToName([Spent By], "FF")!="John Doe" and [Shared Purchase?]=true, [Amount]/2,
    //If user is not John Doe and Checkbox is checked, display the amount divided by two, otherwise execute next if statement.
    
    UserToName([Spent By], "FF")!="John Doe" and [Shared Purchase?]=false, [Amount], 0)
    //If user is John Doe and Checkbox is NOT checked, display the amount, otherwise display 0.​


    ------------------------------
    Everett Patterson
    ------------------------------