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

Similar Messages

  • 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()
    }

  • 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

  • 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 u convert a numeric value to char

    hi,
    how do u convert a numeric value NUMBER(22) to a character value.... like a to_char() function?
    i've tried the CAST function it won't work.

    Hi,
    Use of CAST function will convert NUMBER to CHAR but it takes a lot of time if there are large number of recrods.
    Syntax:
    CAST(col_name AS char)
    I have tried this, it worked fine for less records.
    Are you getting any error while using cast function or while querying..
    As far as I know it won't give error in these cases (if correct syntax used) but it will take very much time (depending on the number of records) while querying.
    -Vency

  • Hi, I've checked how to use kannada keyboard in Yosemite. But, there are some 'vattu forms' and other grammar in Kannada language that I don't know how to use it. For eg, Preetiya taatanige nimma muddu mommagalu maduva namaskara? How to write this?

    Hi, I've checked how to use Kannada keyboard in Yosemite. But, there are some 'vattu forms' and other grammar in Kannada language that I don't know how to use it. I know how to change between the keyboards and can also view keyboard. However, For eg, 'Preetiya taatanige nimma muddu mommagalu maduva namaskara' How to write this? If anybody can answer this, very much appreciated.
    Thanks in advance for your reply.

    In general, you need to use the "f" (kannada qwerty keyboard) or "d" key (kannada) between letters to make special forms.  Also you may need to adjust the typography settings of the font, which is done by doing Format > Font > Show Fonts > Gear Wheel > Typography as shown below.  If you can provide screenshots or more detailed info on things you cannot make, I can perhaps help.
    It is important to note that MS Word for Mac does not support Indic scripts -- any other app should work OK.

  • I purchased CS6 Design & Web Premium.  It appears it is the Middle East Hebrew English version???  How can I make it stay in ENGLISH.  It keep reverting to Hebrew and type runs right to left?  NOT what I asked to purchase?

    I purchased CS6 Design & Web Premium.  It appears it is the Middle East Hebrew English version???  How can I make it stay in ENGLISH.  It keep reverting to Hebrew and type runs right to left?  NOT what I asked to purchase?  [email protected]

    Try setting the text direction with no files open. It should stick for all new files.

  • How can I produce a report of the people asked to complete a form and their response?

    How can I produce a report of the people asked to complete a form and their response?

    Thanks. I cover four different sites. We are using the same questions for the four sites. Each site has a different client base (with different users). So I am inviting persons to complete the form in an ad-hoc basis following training sessions (so far I have trained 10 out of 57). The responses will be viewed by two or three Managers. The problem is that it is difficult to see who has started filling out the form, who has not even looked at it, and those who have completed it. So for example at the moment I have a zero response to my requests to complete the form, although some people may be working on the form?
    Russell W H Bulley C.Eng B.Eng MIET
    Critical Engineering Manager
    MITIE – Delivering FM for Lloyds Banking Group
    5 Limeharbour Court, Limeharbour, London, E14 9RH
    M: 07900704196
    www.MITIE.com<http://www.mitie.com/>
    Follow us:
    Description: Description: Description: Description: Description: Description: Description: twitter_32<http://twitter.com/mitie_group_plc>[Description: Description: Description: Description: Description: Description: Description: facebook_32]<http://www.facebook.com/mitiepeople> Description: Description: Description: Description: Description: Description: Description: linkedin_32 <http://www.linkedin.com/company/mitie?trk=fc_badge>  Description: Description: Description: Description: Description: Description: Description: youtube_32 <http://www.youtube.com/user/MITIEGroupPLC>  Description: Description: Description: Description: Description: Description: Description: rss_32 <http://www.mitie.com/rss>  Description: Description: Description: Description: Description: Description: Description: flickr_32 <http://www.flickr.com/mitie_group_plc

  • How do I allocate a numerical value to a 5 part likert scale question

    I have a survey questionaire and the 15 questions are all arranged on a 5 part 'Liket scale' of strongly agree to strongly disagree.
    How do I allocate numerical values to each question response? 
    I don't want the respondents to see the scoring.
    The reason I need to do this is some response lines are reverse scored. That is to say some lines would be scored 1 to 5 and other lines 5 to 1.
    I think this feature is available on survey monkey.
    Is it available in Acrobat X Pro or Formscentral?
    I'd appreciate your suggestions
    Kind regards
    spreid1

    Hi,
    You can assign numerical responses to the likert answers as follows:
    1. Go into the response table and select the "Table" toolbar button:
    2. Select the header for your Likert questions in the response table.
    3. Click the "Choices" button on the toolbar and select "Edit choice list..."
    4. Select the checkbox for "Assign data values to choices".
    5. Enter the choice data values in the right-hand column.

  • Given a string, how do you find the numeric value in sparse ring?

    Situation: I receive the string value of the sparse ring, and a control reference to the same type of control, but not the control that sourced the string. How can I convert the string, into the actual numeric value of the ring? For example:
    Using the "VISA Select Event Type" ring (Functions -> Instrument I/O -> VISA -> Advanced -> Event -> Select Event Type.ctl), lets say I get the string "ServiceRequest" how do I convert that into 1073684491, the actual value of the ring?
    This is a rework of an existing function that worked fine with "normal" rings.
    Thanks.

    Unfortunately this method will not work, its a generic routine that must be able to take any ring, so I can't hardwire the cases to known outputs. And, of course, searching the array of Strings[] will just find me a useless index.
    My interm solution is this:
    1) pick a small, but likely range of possible values for the ring
    2) iterate through these values, assigning each one in turn to ring
    3) read the RingText property to see if it matches the passed string
    4) if it does, then exit. If it doesn't keep looping.
    5) if no value produces a matching string, declare defeat (raise an error or produce other output that indicates a match could not be found).
    The routine only runs in the UI so I am not too concerned about the time delay this method will i
    mpose, but I would greatly appreciate a smoother solution.
    Thanks for your suggestions.

  • How to represent a -1 numeric value with text?

    Hi All,
    Question: How do I get the value of negative one (-1) in a numeric column to display as "all"?
    Background: For our lottery players, they are able to opt in to various automated alerts.  One column is an integer value representing one of five different thresholds for sending an alert: 10,000, 50,000, 100,000, 500,000, and -1.  The -1 value
    actually represents all of the other 4 values, or simply "all thresholds," meaning "send me an alert at every one of these thresholds."
    What is the best way to represent the -1 value in the cube?  A user won't understand that -1 is equivalent to "all choices".  I could change the view so that the column is a string instead of an integer, but I assume this is going to
    affect the cube in a negative way, such as unexpected sorting, etc.
    I asked our resident SSAS guy if a numeric value could be displayed (not read) as "all values" while actually storing the -1 value, but all he could suggest was changing the data type and using a case statement to replace -1 with "all values." 
    This does not seem like a fix to me.
    Is there a way to make SSAS display a negative one value as "all choices" without changing the data type of the source column itself?
    Thanks,
    Eric B 

    Normally you would have a lookup on the number and a text value for the result displayed to users in the cube.
    KeyValue
    DisplayValue
    10000
    $10,000
    50000
    $50,000
    100000
    $100,000
    500000
    $500,000
    -1
    All Values

  • 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");

  • 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 apply a numerical value to a word in numbers

    For example - decision maker = .75

    What is the relationship between the 'word' and the numerical value?
    If it's a mathematical relationship, your use a formula.
    If it's arbitrary, then you need a table showing the value associates with each word (or in this case, phrase).
    Formula in column B of Main:
    B2: =VLOOKUP(A,Lookup :: A:B,2)
    Filled down to B10.
    To avoid the error messages in B6 to B10, Enclose the formula in an error trap as below:
    B2: =IFERROR(VLOOKUP(A,Lookup :: A:B,2),"not found")
    This will replace the error triangle with the words 'not found'.
    Regards,
    Barry

  • How to refresh page after selecting value from LOV item , in a tabular form

    Hi ,
    I have a tabular form, which contains 2 items(columns), of type "Select List - named LoV".
    Now, couple of issues here.
    1.
    2nd item(column) in tabular form, that LoV should get populated based user's selection value in first item LoV. So how do i refer to the value, that user selected in first item's LoV? I will have to use this reference in LoV query of my 2nd item ( on this tabular form)
    2.
    How can we refresh the page, when user selectes value in first item ( from LoV). As this is a tabular form, here item type is Select List, we dont have an option to pick item type as Select List with Submit. So problem is that when user selects value for item 1, refresh does not happen and item 2 LoV does not get populated as per user's selection in item 1.
    Please help here. Would be really appreciated.
    Thanks and Regards,
    Rave.

    Thanks Ben and Dan for your responses.
    Ben, your solution helped me with refresh of page, as page got submitted.
    This answers to my 2nd question. However, I still need to know first question, which basically is, how do i refer to the value, that user selected in first item LoV.
    Issue is, I selected the value in first item LoV, it got submitted and page fot refreshed. But after page refresh, first item LoV loses its value that I had selected last time. It does not retain the selected value after refresh.
    I have an unconditional process, that on every submit(refresh) of page, I set my items with their corresponding values. But problem is what do i mention there to refer to this item.
    I looked in view source of my page, this item is referred as f03.
    So i used "apex_application.g_f03", to set this item to its value, in my uncoditional submit process. But it did not work. I tried to refer this item as "f03" in this unconditional submit process. But still it did not help, the selected item loses its value after page refresh(submit).
    Any help here would be really appreciated. Please suggest how do we refer to this item's selected value.
    Thanks and Regards,
    Ravi.

Maybe you are looking for

  • Abap and java refresh

    Hi friends, If anybody knows how to refresh an abap and java systems (not abap+java addin) can you please send the docs? Thanks.

  • Video size in Canvas

    Hi, I was messing around sizing the Canvas and quite by accident I pressed the CMD + combination and zoomed in on the Canvas video frame. I can use CMD + or - to resize but it never "fits". I can still drag the corner of the Canvas but the proportion

  • I can not find NI cRIO-9076 in Remote System

    I can not find NI cRIO-9076 in Remote System. How can i deal with it? The Status LED is on every couple seconds.

  • Is there any Certifications for Weblogic Portals ?

    Hi Is there any Certifications for Weblogic Portals ? like RHCE, JCP, MCSE ... Thanks & Regards, Siva VP, [email protected]

  • Software update for xperia m

    The experience with Xperia M is really wonderful but it get exploited when we are not able to move applications to sd card. This phone is not able to store more applications and everytime on downloading new application not enough storage message appe