Using Fields in calculations - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Using Fields in calculations

Last post 04-26-2018 02:11 PM by Hilary Stoupa. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 04-26-2018 11:04 AM

    • mcozz
    • Not Ranked
    • Joined on 04-25-2018
    • Posts 2

    Using Fields in calculations

     Hello, I'm passing drop down values to a field and want to use that field in a calculation.  Is this possible using calculated value?

     Drop down is Yes, No, N/A.  I use the count function to count each box that is selected, in this case, Yes =1:

     count(MD18[. = 1] | MD23[. = 1] | MD25[. = 1] This total (3) goes to a field called "TotalOfMDYes" 

    Similarly,  I want to pass the total of NO values to a field called "TotalOfMDNo"  count(MD18[. = 2] | MD23[. = 2] | MD25[. = 2] | where the drop down value NO = 2

     

    Now I want to take the two fields and use them for mathematical operations, for instance:  TotalOfMDYes +  TotalOfMDNo

    Can this be result then be passed to another field called TotalOfAnswers where TotalOfAnswers = TotalOfMDYes +  TotalOfMDNo?

     I don't have access or proficiency to code this in Visual Studio, so I need it be done in a calculated field or rule.

     Thank you! 

     

     

  • 04-26-2018 11:20 AM In reply to

    Re: Using Fields in calculations

    Sure - just add another field and have the default be TotalOfMDYes + TotalOFMDNo - did you run into an issue when you tried that?
    Hilary Stoupa

  • 04-26-2018 11:32 AM In reply to

    • mcozz
    • Not Ranked
    • Joined on 04-25-2018
    • Posts 2

    Re: Using Fields in calculations

     Here is the formula and it seems to be working correctly now that I've sent you this email.(there are 11 questions)

     

     1-(TotalOfNo) / 11-(TotalOfNA)

     

    Thank you  

  • 04-26-2018 02:11 PM In reply to

    Re: Using Fields in calculations

    It may be when you first tried you didn't have a space around the "/" character on either side. The formula editor would have misinterpreted that as being part of an XPath. :)
    Hilary Stoupa

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