How to calculate gradings in info path - InfoPath Dev
in

InfoPath Dev

How to calculate gradings in info path

Last post 07-06-2016 09:41 AM by Hilary Stoupa. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 07-02-2016 07:17 AM

    How to calculate gradings in info path

    I am a newbie, and i am designing a form with infopath that contains student academic records (scores). I want to know the actual syntax that can calculate a grading score automatically, such as 100 - 90% will apear 'A'. Lets say, i have 2 fields, field1 and field2. If field1 contains a value of 90 - 100%, then field2 should appear 'A', and also if field1 contains 80 - 89%, then field2 should appear 'B' in that order
    Filed under:
  • 07-05-2016 07:25 AM In reply to

    • iLoveData
    • Not Ranked
      Female
    • Joined on 06-06-2016
    • Richmond, VA
    • Posts 6

    Re: How to calculate gradings in info path

    Unfortunately, there are no IF or IIF functions in InfoPath BUT do not fret, this can be done using rules. Field 1 will contain your numeric grade input and Field 2 will contain your calculated Alphabetic grade (mark this field as read only). Create your grading rules using the "Action" Rule Type and create the following 5 rules on Field 2:



    Condition: Field 1 is greater than or equal to 90
    Rule Type: Action
    Action: Set a field's value
    Field: Field 2
    Value: A

    Condition: Field 1 is less than 90 AND Field 1 is greater than or equal to 80
    Rule Type: Action
    Action: Set a field's value
    Field: Field 2
    Value: B

    Condition: Field 1 is less than 80 AND Field 1 is greater than or equal to 70
    Rule Type: Action
    Action: Set a field's value
    Field: Field 2
    Value: C

    Condition: Field 1 is less than 70 AND Field 1 is greater than or equal to 60
    Rule Type: Action
    Action: Set a field's value
    Field: Field 2
    Value: D

    Condition: Field 1 is less than 60
    Rule Type: Action
    Action: Set a field's value
    Field: Field 2
    Value: F

    VOILA, you have your personalized, built in grading system. Let me know how this works for you :-)
    Data, data and more data. Oh, and did I mention data?
    Filed under:
  • 07-05-2016 06:43 PM In reply to

    Re: How to calculate gradings in info path

    Please... I did the exact formula you gave me, but it didn't work. The field2 was still blank, it did not change to the alphabet. I marked field2 as read only and i followed the format, the condition, rule type was set to action, action too was set to "set field's value...jet it didnt work. Please this is the scenario; [field1(Class score 50)] [field2(Exam score 50)] [field3(total score 100)] [field4(Grade)] [field5(Remarks)] all fields are in repeating table So field3 calculates field1+field2 So field4 should change to " A" when field3 is greater than and equals to 90. Please help me, i need to make this thing work And also i need the function for calculating the positions as well. Like; field3 in repeating table is = 98, 86, 80, 43,56,78....the positioning should be like; 1st, 2nd, 3rd,..... Please help me
  • 07-06-2016 09:18 AM In reply to

    • iLoveData
    • Not Ranked
      Female
    • Joined on 06-06-2016
    • Richmond, VA
    • Posts 6

    Re: How to calculate gradings in info path

    I did the exact same thing before I sent the response and it worked like a charm, there is something you are missing. The rule must be created on field 2 NOT field 1, also when you create the logic in the rule, you must select the field that has the parameter. So if field1 will contain the numeric grade, it must reflect that, it will not work if you leave it selected as field 2 by default. Let me know if you have any questions, wish I could attach a screenshot :-(
    Data, data and more data. Oh, and did I mention data?
  • 07-06-2016 09:41 AM In reply to

    Re: How to calculate gradings in info path

    Under a reply, in the options tab, you can add a file - so you can attach a screenshot there. :)
    Hilary Stoupa

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