Text to value logic - InfoPath Dev
in

InfoPath Dev

Text to value logic

Last post 03-13-2012 03:13 PM by rdrnnr. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 03-13-2012 02:05 PM

    Text to value logic

    I'm trying to figure out the best way to write the logic for a text control to show as a value.  I'm creating an assessment checklist.  The answer to a question would be Compliant, Discrepancy or Finding.  What's the best way to create an 'overall score' control value based on these answers?  I hope this makes sense.  Thank you in advance.

  • 03-13-2012 02:49 PM In reply to

    There are a couple of approaches you could take.  If you don't have a lot options and you don't see the values or formula changing often, you can simply use rules based on the selected answers to assign values and generate an overall score.  This is the simplest solution, but doesn't scale much since it involves a little hard coding in the form.

    A better solution would be to assign values to specific entries that are location in a secondary source such as SP list, XML file, or SQL.  You can have a secondary data connection to the external source and the assigned value can be used to create your logic to determine the overall score.  The answers can also pulled from this secondary source, so scability is much better with this approach.

    Anson Hidajat
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 03-13-2012 02:58 PM In reply to

    Thank you.

    It appears the first option is going to be my best bet.  I was modifying other checklists that were created by someone else and had to assign a value to each answer and then use a math calculation to get the score.  However, this meant I had to create a new field, avg all the responses (some were so long that I had to create 3 fields and add them together) and then link to the "score" control for a percentage.  What "hard coding" were you talking about?  Is there an easier way to do this than what I explained?  One checklist alone has 116 questions/answers.

  • 03-13-2012 03:07 PM In reply to

    I mean hard coding as it I have to assign answer 1 a value of 10, answer 2 a value of 20, etc. and this logic would be stored in the form template itself. I can abstract that information into a separate list on SharePoint say, so that if my answers or values change that will not require a template update.

    If you have 116 q/a's then I would definitely recommend going with some of the secondary data source.  Do you have access to a SharePoint server or SQL where can store the answers?

    Anson Hidajat
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 03-13-2012 03:13 PM In reply to

    Unfortunately, not while working remotely.  I am on client site only once a month.  I will try this and see what happens.  Thanks so much for your assistance.

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