Assigning a numerical value to the answers of a multiple choice text field

I have searched and searched thru a million articles but there does not seem to be a simple way to do this, and I hope like heck that I am just overthinking it.  I tend to fall back on years of coding and completely miss a simple answer when doing this
kind of thing so I hope someone can help.
I'm developing a scorecard.  I have a list that has a form on it that asks a series of questions on it.  Some are yes/no.
I want to assign the numerical value of "1" to "yes", and "0" to "No".
This is so that when I create the actual scorecard, I can add up all the answers and generate a calculated score.
Example:
Was this incident properly classified?
[Dropdown]
Yes
No
Do I need an extra column assigning the values?  Can I assign the values within the column itself? Any assistance will be really helpful. 

there are several options:
- calculated column with something along the lines of =IF([dropdowncolumn] = "YES", 1, 0)
- separate lookup list with values
- if you're using infopath, your column could be numeric, and just use a DropDown as the visualization, and populate the DDL with key/values of "Yes"/1 and "No"/0 (though in this case, when viewing the list as a native grid, the column
would only show 1/0, not "yes / no"
- depending on how you're creating the scorecard, use a yes/no (boolean) column and just convert during the calculation
lots of options come to mind.
Scott Brickey
MCTS, MCPD, MCITP
www.sbrickey.com
Strategic Data Systems - for all your SharePoint needs

Similar Messages

  • Assigning a Numeric Value in a Cell Based on Text in Another Cell

    In advance, thanks for your assistance. I'm trying, in vain, to assign a numeric value in a cell based on text (from a dropdown menu) in another cell. For example, in cell A5 I have a dropdown list that includes the options "blue", "red", "white", and "gold." I want cell C15 to be 2 if A5="blue"; I want C15 to be 0 if A5="red"; I want C15 to be 2 if A5="white"; and, I want C15 to be 1 if A5="gold."

    Tippet,
    This is a job for LOOKUP.
    The expression for the Result cell is: =LOOKUP(A2, Lookup :: A1:A4, Lookup :: B1:B4)
    The aux. table contains the matches that you assign for the colors.
    Regards,
    Jerry

  • How do I assign a numerical value to text cells in cartesian products?

    Hi, this is more of a two part question.
    Question 1
    I need to be able to assign numerical values (Table Value £ of set up) to text cells (Set Up).
    1. The table "Combinations" then uses the formula
    IF($A3≤Information::$B$8, MOD(INT((ROW(cell)−3)÷PRODUCT(C$1:$G$1)), B$1), "")
    to take info from the "Information" table and create all possible permutations of "Set Up"
    2."List" is the printed list of "Combinations"
    3."Output of list" concatenates the data from "List".
    Question 2
    4. How do I print out the total numerical value of the concatenated string of "Output of List" into Output (£) of List"?

    >
    When posting code or code snippets. HTML/XML or input/output, please use the code tags. The code tags help retain the indentation and formatting of the sample. To use the code tags, select the sample and click the CODE button.
    Here is how the first code snippet would have appeared in code tags.
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    float num1, num2, num3, result;
    num1 = Float.valueOf(jRadioButton1.getMnemonic());
    num2 = Float.valueOf(jRadioButton2.getMnemonic());
    num3 = Float.valueOf(jRadioButton3.getMnemonic());
    result = num1+num2+num3;
    jTextField1.setText(String.valueOf(result));And while I'm on the subject of retaining the indentation of the original sample, please use one of the two common conventions for indenting code blocks. E.G.
    Convention 1:
    class TheClass {
        TheClass() {
    }Convention 2:
    class TheClass
        TheClass()
    }

  • How to assign a dynamic value to the value property of a button ?

    Hi Folks,
    I have a need, can i know how to assign a dynamic value to the value property of a button. Scenario is like follows...
    This is a struts based web application
    1. I have a file which consists of login user details (user name and his previlages) for a web application.
    2. I got those user details, into a List.
    3. When a user logged into the web app, in the home page there are few buttons. The type and number of buttons shown depends on the type of user/ user. (Buttons have different combination and the number of buttons available are not constant, they will vary from user to user).
    4. for each button, there will be a different action. I can pass the value of a button to an action class, but here button must have a dynamic value.
    Here is my test code:
    <%
    if (List != null)
    for (int i = 0; i <List.length; i++)
    %>
    <html:submit property="rduname" value= "<%=List%>" onclick="return submitRdu('<%=List[i] %>');"/>
    <%
    %>
    But my problem is how to assign a dynamic value to the value property of the button ( i know 'value= "<%=List[i]%>" ' will not work, just wanted show you guys).
    Thanks in advance,
    UV
    Edited by: UV_Dev on Oct 9, 2008 2:15 PM

    Let me try i know am not good at JSP but do we need double quotes here
    value= <%=List%>i think JSTL should help you about the dynamic thing                                                                                                                                                                                                                                                                                                                       

  • Can one assign a numerical value to a variable?

    Hi All,
    Good afternoon,
    I am currently working on a form that has strings as values in 2 different listboxes, and depending on what is selected a message pops up. Here is the script I wrote, but it does not seem to work right
    var a=aKlaclistbox.raWvalue=="SSK";
    var b=bZlaslistbox.raWvalue=="SGT";
    a.value=1;
    b.value=2;
    if(a > b){
        xfa.host.messagebox("You cannot select a lower officer as the rating officer");
    It does not work, and I am just wondering if there is any way I can get around it so that I can compare the values. I need help from anyone on this forum.
    Thanks
    v/r
    Tammy

    There's probably a better way of doing this, as, depending on how many ranks you have, it could get cumbersome. Like using an array or something like that but not sure how to accomplish that.
    If there are a lot of ranks to compare I think I'd suggest reworking things so that you can use the numeric value of the list box, it will be much easier in the long run.
    As I mentioned above, I don't think the following is valid code:
    var a=aKlaclistbox.raWvalue=="SSK";
    Nor is (unless dealing with global variables):
    a.value=1;
    I think you need to do something like the following (hopefully someone else around here might have a better idea!):
    var a;
    var b;
    if (aKlaclistbox.rawValue == "SSK") {
         a = 1;
    if (bZlaslistbox.rawValue == "SGT") {
         b = 2;
    //You would need a series of else/if with the above to map the different rank values.
    if (a > b) {
       xfa.host.messagebox("You cannot select a lower officer as the rating officer");

  • How to 'Only' allow Numeric value in the Edit Box in AcroDialogs

    Hi all,
    I've create an AcroDialog wizard, I need to allow onlu numeric values in the Edit Box. Can someone please help me with this validation?
    Regards,
    Chris

    There isn't a keystroke event for custom JavaScript dialogs, or any proper interactive events for the fields.  You can validate fields when the user presses OK, and you can test fields when the user changes focus by setting the "Action" property for the field.  But the only practical way to restrict user input to numbers is to use George's suggestion.  There is a number property for the fields but it has an undesirable side affect and I never use it.
    Thom Parker
    The source for PDF Scripting Info
    pdfscripting.com
    The Acrobat JavaScript Reference, Use it Early and Often
    http://www.adobe.com/devnet/acrobat/javascript.html
    Then most important JavaScript Development tool in Acrobat
    The Console Window (Video tutorial)
    The Console Window(article)

  • Is there a way to get the cursor position index of html text field

    I'm trying to work on a text pad like MC with "insert text at
    position X" and "find and replace" can anyone tell me how to find
    the cursor index of an html text field. Selection.getBeginIndex() ,
    Selection.getEndIndex(), Selection.getCaretIndex() as far as I know
    these methods only work with text and not htmltext.
    What I'm trying to do is assign different parts of the string
    to variables so that I can combine them to reconstitute my html
    string.

    enfantterrible:
    If I understand correctly, you want the corresponding
    position in the
    htmlText propery of the caret index (which as you point out
    is only the
    position in the plain text version of the textfield content).
    Below is how I would do it. Maybe there's an easier or more
    efficient
    way (using XML objects etc), but I don't know it. You could
    conduct all
    your string searches in the plain text and then convert the
    result to
    the html positions. I didn't build this to accept negative
    parameters
    for the pos parameter (e.g. from end of string backwards) but
    the
    function could be adapted to do this too if necessary. The
    test data is
    not proper html from a text field, but it doesn't really
    matter what it
    is so long as its formatted correctly. It just separates the
    tags from
    the content to enable apples with apples comparison.
    //some test data
    var testStringXML = "<format>Hel<b>lo i can't
    t<i>ell you h</i>ow hap</b>py I
    am.</format>";
    var undecoratedString = "Hello i can't tell you how happy I
    am.";
    //the conversion function
    function findDecoratedPosition(pos:Number, xmlString:String,
    test:Boolean):Number {
    //anything between '<' and '>' should be excluded from
    plain text search.
    //create an array of array elements (n=2) consisting of tag
    then plain text
    //requires correctly formatted xml/html
    var tempArr:Array = xmlString.split("<");
    for (var aa = 0; aa<tempArr.length; aa++) {
    tempArr[aa] = tempArr[aa].split(">");
    //remove the first and last elements of the new array (these
    are empty)
    tempArr.pop();
    tempArr.shift();
    //find the corresponding plaintext location and calculate
    the "decorated" position
    var retPos:Number = 0;
    var posCount:Number = 0;
    for (var aa = 0; aa<tempArr.length; aa++) {
    retPos += tempArr[aa][0].length+2+tempArr[aa][1].length;
    //+2 allows for missing < and >
    posCount += tempArr[aa][1].length;
    if (posCount>pos) {
    return (retPos+(pos-posCount));
    //out of range
    return -1;
    //test code:
    for (var aa = 0; aa<undecoratedString.length; aa++) {
    var altPos = findDecoratedPosition(aa, testStringXML);
    trace(undecoratedString.charAt(aa)+" in position "+aa+"
    plainText equates to position "+altPos+" in the decorated version
    ["+testStringXML.charAt(altPos)+"]");
    }

  • Hello All. I am working on a form, but I need to format the leading in a multi-line text-field.

    Hello All. I am working on a form, but I need to format the leading in a multi-line text-field. The options for the text-field only show a font size option, but no other styling options. Is there a way to format the leading? Thanks!

    Not within ID, and I'm not sure it can be done in Acrobat afterward either.

  • Select more than one answer on a multiple choice question

    How do you select more than one answer on a multiple choice question on an employment application on the internet?

    marmaldonado,
    Is this a PDF form? Or a web form?
    Clinton

  • Is the component uiscrollbar for use with text fields only

    Is the component uiscrollbar for use with text fields only?

    Yeah, it isn't in the library, you need to call it up using code.  It is documented in the help files though, so that should help you get it into use.

  • Assigning a String Value to the value attribute of html:file

    Hi,
    we facing a problem while assigning a value to the VALUE attribute of file tag
    <html:file property="fileupload" size='25' value="sample.xls" onchange="callsheet()" />
    can anyone help me out plzzz,

    Two points -
    1) Java is not Javascript or HTML; you would do better to find a more appropriate forum.
    2) When you take this to a better forum, you need to describe the problem.

  • Assigning a numerical value

    I am new to Acrobat and still have not figured out a few things. I am trying to make a very simple form for my boss. Basically an inventory sheet with calculations. He is basically looking for an excel spreadsheet in Acrobat. Is this possible? I need to assign a dollar value to a field. One that the client can not change and one that apprears always. The basic formula would be A(field1)*B(field 2) = sum (field 3)
    I dont even know if I am explaining this right. ARG. All help appreciated! Cheers

    Hi again!
    Thank you again for all the help. I have completed my form but am having 1 more problem. I hope I explain this properly:::  My form works almost perfectly. ie:: enter quantity of item. $ amount gets tallied at the end based on quantity. Sub-total amount is correct BUT when sub-total gets HST multiplied to it I am consistently out by $39. I have no idea where this number is coming from.
    My formula for my total is (subtotal*HST)
    My formula for my HST $ amount is default value: 0.12 Format:Percentage
    My formula for Total is (subtotal+HST)
    Also when I am entering quantity the total will not calculate the HST until you enter a 2nd quantity amount. Which it is still under by $39, although if you enter a "0" quantity amount after this it will calculate the formula perfectly.  Same goes with clearing the sheet:: you can clear all the numbers off and it still will have $39 left on the "bill" but if you enter a "0" and then erase it, it clears the sheet perfectly. Is this a glitch or am I not doing something? Thank you for your help in advance.

  • How do I assign a numeric value to an alpha character within a form and still run a total?

    I am trying to build an attendance sheet where P=Present, A=Absent and so on.  I've created the summary field correctly however the individual fields will only take numeric characters.  I would like for the user to be able to enter P, the P stay there visually but have a "real value" of 1 and then have a numerical total at the end.  In other words, P=1, A=0, etc...
    Thanks in advance for your help!
    Lucy

    Hi Lucy
    Create a text field called "Total" and make the following its custom calculation script:
         var presentDays = [];
         for (var i=0; i<this.numFields; i++) {
             var f= this.getField(this.getNthFieldName(i));
             if (f.value=="P" || f.value=="p")
             presentDays.push(1);
         var p = presentDays.length;
         this.getField("Total").value = p;
    The above will search through your form and find all fields with "P" or "p" in them, in which case it adds 1 to the total and displays it in the "Total" field.
    I hope this helps.
    Michael

  • ALV WebDynpro Hierarchy -Setting non-numeric values in the header level row

    Hi Experts,
    When setting up an ALV table as a table hierarchy the standard ALV settings only seem to allow for numeric values to be displayed in the higher hierarchy levels. Is there a way to also set the values for some non-numeric columns into these higher-level rows - programmatically or through the ALV Settings?
    Example: I have delivery item level data in my context and the delivery number as a hierarchy column. Some columns in my context however actually come from the delivery header e.g. delivery block, delivery priority, ship-to etc and I would like to display these in the collapsed header rows of the delivery number.
    It seems obvious to me that this should be doable otherwise if you are looking at at a list of hundreds of deliveries and all you see besides the delivery number is numeric data such as sums & totals, it's kind of hard to know which delivery you might want to expand the sub-level for.
    Please help,
    Peter

    Hi,
    Even we have faced the same issue.
    In ALV hierarchy, we cannot display data at header items/levels. this is a constraint in ALV. You can achieve the same usign TABLE UI element.

  • How do I get a numerical value for the number of tick boxes or "true / false" in a column?

    Hi,
    Any help for my very simple brain appreciated...
    All I want to do is add in a formula for adding up the ticks in column B i.e. B2 - B46 so the answer of ticks is in B47!?
    And what's doing my head in is I can't even copy and paste a section to show on here!!
    Thanking anyone that can help.

    dominic.birch wrote:
    Hi,
    I just can't do it - it's doing my head in!!
    I'm adding the footer as suggested but the =COUNTIF(B, TRUE) isn't working; it just shows as I've typed it i.e. doesn't add up the ticks??
    D
    It would appear that you are typing it in as text, not creating a formula.  On the iPad, you don't type an "=" nor do you type the function name. You press the "=" button which then lets you start a formula. You choose the function by pressing the "functions" button then choosing it from the list. The function shows up in the editting bar with words in colored ovals for the parameters. You click on the various parameters in the formula to edit them. And you use the mathematical operators and click on cells or choose formulas to create mathematical operations.

Maybe you are looking for

  • JAVA CRYPTO TOOLKIT

    I need to install JAVA CRYPTO TOOLKIT on XI 3.0. is the Plain J2SE Adapter engine a prerequiste for Java Crypto Toolkit?

  • Authentication tab SAP - BOxi Ent 3.1 and Int kit on AIX

    Hello Installation of BO-XI Enterprise 3.1 and SAP integration kit 3.1 on AIX.  Both products installed successfully. But on CM Console in authentication tab SAP is not appearing. Also when we try to  create new connection using universe designer fro

  • How to make the selection screen field names to apper as in logon language

    hai the selection screen field names should appear as that of logon language and <u>before that once i logon with a language it should pop up the (some)message in the logon language</u>. For the selection screen filednames to appear as that of the lo

  • When sorting, Itunes ignores "The" of my artists names

    When sorting, Itunes ignores "The" of my artist name. Is it normal? Like "The Offsprings" is sort with my "O" artist. Is there a way that I tune would recognize it?

  • FCE - can't save to tape

    I'm using FCE 4 and trying to output to a Sony Handycam tape. When I use Print to Video, the record light on the camera turns on, the tape begins to roll, but no video (or audio) comes through. That is, there is no video on the camera viewer screen.