About Sum function - InfoPath Dev
in

InfoPath Dev

About Sum function

Last post 03-12-2007 08:08 AM by alea. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 03-09-2007 01:08 PM

    • alea
    • Not Ranked
    • Joined on 03-09-2007
    • Posts 9

    About Sum function

    Hi, I am trying to calculate final ratings. and What I wanted is something like sum(rating * percentFocus) + sum(rating * percentFocus) + sum(rating * percentFocus) + sum(rating * percentFocus) + sum(superRating * percentFocus) and I got the error "Argument 1 must return a node-set.".

    I don't know what I did wrong. Would you please help me out? I appreciate any help.

    The following is the xpath for the fomular:
    sum(../../my:core/my:customerFocus/my:managerEvaluation/my:rating * ../../my:core/my:customerFocus/my:percentFocus) + sum(../../my:core/my:collaboration/my:managerEvaluation/my:rating * ../../my:core/my:collaboration/my:percentFocus) + sum(../../my:core/my:leadership/my:managerEvaluation/my:rating * ../../my:core/my:leadership/my:percentFocus) + sum(../../my:results/my:result/my:managerEvaluation/my:rating) + sum(../../perf:currentObjectives/perf:objective/my:supervisor/my:superRating * ../../perf:currentObjectives/perf:objective/perf:percentFocus)
  • 03-12-2007 12:34 AM In reply to

    Hi alea

    You cannot do Sum function on calculated value, Sum function is used for calculation on fields. You can do in the following way

    Field1, Field2, Field3, Field4, Field5, Field6, Field7

    Field3=Field1*Field2

    Field4=Field5*Field6

    Field7= Sum(Field3)+sum(Field4)
    Madhuri
    http://www.ggktech.com
  • 03-12-2007 08:08 AM In reply to

    • alea
    • Not Ranked
    • Joined on 03-09-2007
    • Posts 9
    Hi, Madhuri,

    Thank you very much for help. It did what I want.

    Alea
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.