Calculated field doesn't calculate

If I create a form from scratch , I can make it calculate a field for me, but if I import even a simple PDF into LiveCycle Designer, and try to add fields and make them calculate, they just sit there, not calculating anything.
Attached is a form I'm trying to make calculate something for me.  The top 3 unmarked boxes are A, B and C.  C is supposed to calculate A+B.  I don't know why it won't... any ideas?

You are using FormCalc syntax on the JavaScript calculate event. Use either
// topmostSubform.Page1.c::calculate - (FormCalc, client)
$.rawValue = a + b
or
// topmostSubform.Page1.c::calculate - (JavaScript, client)
this.rawValue = a.rawValue + b.rawValue;
Steve

Similar Messages

  • DAX Dynamic Banding | Calculated Member based on Calculated Field

    Good morning,
    I've created a Power Pivot model that measures the blood glucose levels of clinical patients at specific times of the day. The requirement is that this metric, let's call it GlucoseLevel, is always averaged as it wouldn't make sense to sum up the values.
    To meet this first requirement, I set the "Summarize By" property of the GlucoseLevel column to "Average".
    The second requirement is to band the GlucoseLevel values so that groups of people can be measured by this band rather than by the individual measure values. I created a banding table in Excel and then imported it into the Power Pivot model. The banding table
    has three columns (BandName, MinValue and MaxValue) and has the following values:
    VERYLOW: Min Value = 0; Max Value = 3.99
    OK: Min Value = 4; Max Value = 6.99
    WARNING: Min Value = 7; Max Value = 10.99CRITICAL: Min Value = 11; Max Value = 30.00
    It is at this point where I face my challenge. I have a GlucoseLevel measure and I have a banding table. Great. The challenge is: How do I create a calculated, dynamic
    member that will look at my GlucoseLevel measure (at whatever level), do a lookup to my banding table, and then return the "BandName" column from the Banding table at that specific level? So to clarify what I mean by level: I want to be able
    to view the bandings at Year level, or a Month level, or even at a week level. Then depending on what level I am at, my measure should have a Band associated to it.
    I've tried to solve this issue in a couple of ways:
    Attempt 1
    Create a calculated column in my fact table that contains a nested IF statement to manually band my GlucoseLevel values. This works fine if I view my data at the lowest level of granularity, however
    it does not work if I start looking at my data at the day, week, month etc. levels
    Attempt 2
    1.) Create a calculated field (not a calculated column) that averages my GlucoseLevel measure. This is cool because it will average my measure at whatever level I am viewing it at. Let's call
    this field Bob...
    2.) Band my measure Bob by creating another calculated field (called PatientBand). This field uses my banding table (described earlier) in conjunction with my calculated field Bob. This works perfectly, except for one big flaw: Excel sees this banding field
    as a measure, and not as something that I can use as a column / row...
    So my question is: Can I trick Excel into viewing my PatientBand calculated field as an attribute, and not as a measure? And if not, how do I get around this challenge? Here is the DAX formula that I used to create my second calculated field "PatientBand":
    PatientBand:=CALCULATE(
        VALUES (Bandings[BandName]);
        FILTER (
            Bandings; 
            Test[Bob] >= Bandings[MinValue]
         && Test[Bob] <= Bandings[MaxValue]
    Thanks!

    So there are 2 ways that I can think of for doing that.
    1) if you are only using MDX clients like Excel or Reporting services you can create a text based measure that returns the banding name. (Note that this sort of approach does not work at the moment with PowerView as it only displays numeric measures). This
    would effectively let you show a label next to a reading as opposed to moving the reading under a given banding column.
    Banding Name :=
    CALCULATE (
        VALUES ( Bands[BandName] ),
        FILTER (
            Bands,
            [Average of GlucoseReading] >= Bands[BandMin]
                && [Average of GlucoseReading] <= Bands[BandMax]
                && NOT ( ISBLANK ( [Average of GlucoseReading] ) )
    2) This next approach will show the results exactly as you had them in your sample screenshots. It just takes a slight bending of the DAX. I'm using a SUMX here, not because I want to sum anything, but because the "X" version of SUMX basically loops over
    every row in the specified table and sums the expression in the second parameter. I have setup the second parameter so that it only returns a single value for the average if it is in the appropriate banding. 
    Banded Average:=IF (
        HASONEVALUE ( Bands[BandName] ),
        SUMX(
            'Bands',
            IF (
                NOT ( ISBLANK ( [Average of GlucoseReading] ) )
                    && [Average of GlucoseReading] >= MIN ( Bands[BandMin] )
                    && [Average of GlucoseReading] <= MIN ( Bands[BandMax] ),
                AVERAGE(Readings[GlucoseReading]),
                BLANK()
    ,AVERAGE(Readings[GlucoseReading])
    http://darren.gosbell.com - please mark correct answers

  • Trouble with calculating fields. Can't select (check) fields. Also can't figure out what's wrong with a division field (percent) that I created. Keep getting the pop up that format of the field doesn't allow blah blah blah... Help!

    Trouble with calculating fields. Can't select (check) fields. Also can't figure out what's wrong with a division field (percent) that I created. Keep getting the pop up that format of the field doesn't allow blah blah blah... Help!

    1. Use the mouse to select the field and then press the space bar.
    2. A null string is the same as zero. What is the result for division by zero?

  • IF statement in Calculated Field for Share point, doesnt calculate sum in my Excel Pivot table.

    Hi Everyone
    I used this in SP calculated column field.
    =IF([Shift Sched]="1pm to 10pm","0",IF([Shift Sched]="2pm to 11pm","1",IF([Shift Sched]="3pm to 12am","2",IF([Shift Sched]="4pm to 1am","3",IF([Shift Sched]="5pm to 2am","4",IF([Shift
    Sched]="6pm to 3am","5",IF([Shift Sched]="7pm to 4am","6",IF([Shift Sched]="8pm to 5am","7",IF([Shift Sched]="9pm to 6am","8",IF([Shift Sched]="10pm to 7am","8",IF([Shift
    Sched]="11pm to 8am","7",IF([Shift Sched]="12pm to 9am","6",IF([Shift Sched]="1am to 10am","5",IF([Shift Sched]="2am to 11am","4",IF([Shift Sched]="3am to 12pm","3",IF([Shift
    Sched]="4am to 1pm","2",IF([Shift Sched]="5am to 2pm","1",IF([Shift Sched]="6am to 3pm","0",IF([Shift Sched]="7am to 4pm","0",IF([Shift Sched]="8am to 5pm","0",IF([Shift
    Sched]="9am to 6pm","0",IF([Shift Sched]="10am to 7pm","0",IF([Shift Sched]="11am to 8pm","0",IF([Shift Sched]="12pm to 9pm","0"))))))))))))))))))))))))    
    it was able to work fine however my issue is when i extract the information to excel and use a pivot table the table is not able to calulate the sum of the value for this field. Can you please help me with this. this is for an Attendance traker for Night
    Differential pay for employees. they create a daily log of their shift schedule and if i summarize this in pivot the value in the calculated field for this is not getting the sum.
    Thanks,
    Norman

    Hi Everyone
    I used this in SP calculated column field.
    =IF([Shift Sched]="1pm to 10pm","0",IF([Shift Sched]="2pm to 11pm","1",IF([Shift Sched]="3pm to 12am","2",IF([Shift Sched]="4pm to 1am","3",IF([Shift Sched]="5pm to 2am","4",IF([Shift
    Sched]="6pm to 3am","5",IF([Shift Sched]="7pm to 4am","6",IF([Shift Sched]="8pm to 5am","7",IF([Shift Sched]="9pm to 6am","8",IF([Shift Sched]="10pm to 7am","8",IF([Shift
    Sched]="11pm to 8am","7",IF([Shift Sched]="12pm to 9am","6",IF([Shift Sched]="1am to 10am","5",IF([Shift Sched]="2am to 11am","4",IF([Shift Sched]="3am to 12pm","3",IF([Shift
    Sched]="4am to 1pm","2",IF([Shift Sched]="5am to 2pm","1",IF([Shift Sched]="6am to 3pm","0",IF([Shift Sched]="7am to 4pm","0",IF([Shift Sched]="8am to 5pm","0",IF([Shift
    Sched]="9am to 6pm","0",IF([Shift Sched]="10am to 7pm","0",IF([Shift Sched]="11am to 8pm","0",IF([Shift Sched]="12pm to 9pm","0"))))))))))))))))))))))))    
    it was able to work fine however my issue is when i extract the information to excel and use a pivot table the table is not able to calulate the sum of the value for this field. Can you please help me with this. this is for an Attendance traker for Night
    Differential pay for employees. they create a daily log of their shift schedule and if i summarize this in pivot the value in the calculated field for this is not getting the sum.
    Thanks,
    Norman

  • Is it possible to edit a calculated field?

    Is there a way to make a calculated field editable, overriding the calculation? My form table calculates HST on pay amounts. But not everyone charges HST so I'd like the user to be able to put $0 in the field manually. I can create an HST option box for each row but...that's a lot of "contriving" and not a practical solution ( I don't think). Is there an easier way to do this?
    Thanks.

    The HST is variable because the form is used in all provinces.
    In order to make it a no-brainer for the user, I have incorporated a check box on each row. If the check box is checked (value=1) then the HST calculation happens, otherwise the value=0. So this makes sense but doesn't work. I have adjusted the calculation order, doesn't make a difference.
    Note: I've never used java but I used to work with Access databases so I do have an understanding of the language/logic, hopefully enough to help me learn this quickly.
    Here is what I tried. HST option is the value of the checked Check box, which is "1". This code is returning the else value fine but otherwise isn't working and doesn't change when I toggle the Check box. Can you help me adjust this.
    var h = this.getField("HSToption");
    var f = this.getField("TOTALbeforeHST");
    var g = this.getField("HSTPercentageValue");
    if(h == 1){
    event.value = f.value * g.value;
    }else{
    event.value = "0";

  • How to keep a calculation field blank until the user enters a number?

    I am building a sales sheet for a school that sells scrip as a fund-raiser. I have the document set so that when the user enters the number of scrip certificates he wants (say, two $25 gift certificates at Lowe's), the program will automatically calculate that this user owes $50 for that scrip category. However, there are more than 100 companies that one can choose from, and if the user doesn't enter a number, the calculated field shows $0. Is there a way that each field can stay blank until the user enters a number bigger than zero? By the way, I'm using this calculation to determine the value (borrowed from a user on this forum): event.value = 50 * this.getField("Lowes").value
    Thanks!

    There are two approaches. You can either add the following Validate script:
    // Custom Validate script for calculated field
    if (+event.value !== 0) event.value = "";
    Or you can change your custom Calculate script and set the Format type of the field to "None":
    // Custom Calculate script
    (function () {
        var v = +getField("Lowes").value;
        event.value = (v !== 0) ? util.printf("$%.2f", v) : "";

  • Create Calculated Field in PHP Form

    Hi,
    I'm trying to create a calculated field that will work out the average of ratings given during the input of a form. This field will then submit the average value with the form at the end (which is why I need the value to calculate before the form submits - i.e., as the form is filled in).
    I have found the following code (designed for HTML forms rather than PHP forms, but I'm hoping it might work). It doesn't seem to do anything - the field doesn't show any information. Help?
    <script language=javascript>
    <!--//
    function dm(amount)
      string = "" + amount;
      dec = string.length - string.indexOf('.');
      if (string.indexOf('.') == -1)
      return string + '.00';
      if (dec == 1)
      return string + '00';
      if (dec == 2)
      return string + '0';
      if (dec > 3)
      return string.substring(0,string.length-dec+3);
      return string;
    function calculate()
      Opp1 = 0;  Inv1 = 0;  Com1 = 0;  wlb1 = 0;  Com2 = 0;  Atm1 = 0;  Per1 = 0;  Inc1 = 0;  Rew1 = 0;  Env1 = 0;  Gro1 = 0;
      if (document.form1.Opportunity.value > "")
         { Opp1 = document.form1.Opportunity.value };
      document.form1.Opportunity.value = eval(Opp1); 
      if (document.form1.Investment.value > "")
         { Inv1 = document.form1.Investment.value };
      document.form1.Investment.value = eval(Inv1); 
      if (document.form1.Community.value > "")
         { Com1 = document.form1.Community.value };
      document.form1.Community.value = eval(Com1); 
      if (document.form1.WLB.value > "")
         { wlb1 = document.form1.WLB.value };
      document.form1.WLB.value = eval(wlb1); 
      if (document.form1.Communication.value > "")
         { Com2 = document.form1.Communication.value };
      document.form1.Communication.value = eval(Com2); 
      if (document.form1.Atmosphere.value > "")
         { Atm1 = document.form1.Atmosphere.value };
      document.form1.Atmosphere.value = eval(Atm1); 
      if (document.form1.Performance.value > "")
         { Per1 = document.form1.Performance.value };
      document.form1.Performance.value = eval(Per1); 
      if (document.form1.Inclusion.value > "")
         { Inc1 = document.form1.Inclusion.value };
      document.form1.Inclusion.value = eval(Inc1); 
      if (document.form1.Rewards.value > "")
         { Rew1 = document.form1.Rewards.value };
      document.form1.Rewards.value = eval(Rew1); 
      if (document.form1.Environment.value > "")
         { Env1 = document.form1.Environment.value };
      document.form1.Environment.value = eval(Env1); 
      if (document.form1.Groups.value > "")
         { Gro1 = document.form1.Groups.value };
      document.form1.Groups.value = eval(Gro1); 
      Totamt =
         eval(Opp1) +
         eval(Inv1) +
         eval(Com1) +
         eval(wlb1) +
         eval(Com2) +
         eval(Atm1) +
         eval(Per1) +
         eval(Inc1) +
         eval(Rew1) +
         eval(Env1) +
         eval(Gro1) ;
      document.form1.GrandTotal.value = dm(eval(Totamt));
    //-->
    </script>
    Any suggestions gratefully received.

    @uscart - Thanks for your thoughts. I think I may try and pursue the javascript option (considering how far I've gone with it) but don't quite understand your response. Does it matter if the input field isn't a text box? The fields are radio buttons (giving options 1-10), liek so:
      <input name="Investment" type="radio" class="star" value="1"/>
      <input name="Investment" type="radio" class="star" value="2"/>
      <input name="Investment" type="radio" class="star" value="3"/>
      <input name="Investment" type="radio" class="star" value="4"/>
    ...etc, etc, etc... for each of the input fields listed above.
    Where do I put the calculate() function? After each "option", or is there a different reference? And does it need to be added to the GrandTotal field as well (the field in which the calcualtion is to be displayed)?
    Thank you!

  • Is it possible you to edit a calculated field?

    Is there a way to make a calculated field editable, overriding the calculation? My form table calculates HST on pay amounts. But not everyone charges HST so I'd like the user to be able to put $0 in the field manually. I can create an HST option box for each row but...that's a lot of "contriving" and not a practical solution ( I don't think). Is there an easier way to do this?
    Thanks.

    The HST is variable because the form is used in all provinces.
    In order to make it a no-brainer for the user, I have incorporated a check box on each row. If the check box is checked (value=1) then the HST calculation happens, otherwise the value=0. So this makes sense but doesn't work. I have adjusted the calculation order, doesn't make a difference.
    Note: I've never used java but I used to work with Access databases so I do have an understanding of the language/logic, hopefully enough to help me learn this quickly.
    Here is what I tried. HST option is the value of the checked Check box, which is "1". This code is returning the else value fine but otherwise isn't working and doesn't change when I toggle the Check box. Can you help me adjust this.
    var h = this.getField("HSToption");
    var f = this.getField("TOTALbeforeHST");
    var g = this.getField("HSTPercentageValue");
    if(h == 1){
    event.value = f.value * g.value;
    }else{
    event.value = "0";

  • New Calculated field question. Complicated I think.

    I have managed to create this table from a MySQL database: http://ppbm5.com/DB-PPBM5.php
    The field 'Total' is a calculated field using this SQL query:
    $query_Recordset1  = 'SELECT *, `Disk I/O`+`MPEG2-DVD`+`H264-BR`+IFNULL(`MPE On`,`MPE  Off`) As Total, `CPU`*`Cores` As Phys_Cores FROM `Personal_data` WHERE 1  ORDER BY (`Disk I/O`+`MPEG2-DVD`+`H264-BR`+IFNULL(`MPE On`,`MPE Off`)),  `Date & Time` ASC';
    So far, so good, but as you may have  noticed, there is a next field called 'Rel. Perf.' which only contains  blanks. And that is where my problems start.
    The table is sorted by 'Total' and the first record shows these figures and field names that are relevant for my question:
    Fields: 'Total'  'Disk I/O'  'MPEG2-DVD'   'H.264-BR'   'MPE On'   'MPE Off'
    Values:  131,        67,              21,                  37,              6,              64
    In addition, I use four 'weight' figures, let's say these are 0.27 , 0.30 ,  0.20 and 0.23 denoted as W1, W2, W3, W4.
    First step is to calculate four temp values, using a formula like this resulting in T1, T2, T3 and T4:
    T1 = W1 x  Total /Disk I/O; T2 =  W2 x Total/MPEG2-DVD ; T3 = W3 x Total/H.264-BR ; T4 = W4 x Total/(IFNULL(MPE On, MPE Off)
    Note that this only applies to the top record and here the SUM(T1, T2, T3, T4) results in 131, equal to the Total.
    The result of 100 x SUM(T1, T2, T3, T4)/ Total = 100 should be the 'Rel.Perf.' result for the top record.
    Now  is gets difficult. Let me call the records R1, R2, R3, ..., Rx. Now, in  the previous step we have established that the figure 100 should into  R1.
    For R2 the result of the 'Rel.Perf.' is 100 x SUM(T1 x Disk  I/O(2), T2 x MPEG2-DVD(2), T3 x (H.264-BR(2), T4 x (IFNULL(MPE on, MPE  Off)))/ Total(2)
    For R3 the result of the 'Rel.Perf.' is 100 x  SUM(T1 x Disk I/O(3), T2 x MPEG2-DVD(3), T3 x (H.264-BR(3), T4 x  (IFNULL(MPE on, MPE Off)))/ Total(3)
    etcetera for all the rest of the records in the table.
    A  complicating factor is that the reference point of the top machine  should remain fixed at 100, but when doing queries, the top machine may  not be in the query results, but all the query results for the Rel.Perf.  should be derived from these scores. Life would be infinitely easier if  one would be certain that the top machine is fixed, but that is not the  case.
    Sorry to make this such a long and complicated post, but  for those who have struggled through this long message, if you have any  suggestions on how to make this work, I would appreciate it.
    Thanks in advance.
    Harm, while non is intended.
    PS. I have been trying to generate a SQL query, using the following code:
    $query_Recordset1 = 'SELECT *, FORMAT(`Disk I/O`+`MPEG2-DVD`+`H264-BR`+IFNULL(`MPE On`,`MPE Off`),0) As Total, FORMAT((54.661*`Disk I/O`+161.25*`MPEG2-DVD`+71.66666*`H264-BR`+645*IFNULL(`MPE On`,`MPE Off`))/129,1) As RPI,`CPU`*`Cores` As Phys_Cores FROM `Personal_data` WHERE 1 ORDER BY 54.661*`Disk I/O`+161.25*`MPEG2-DVD`+71.66666*`H264-BR`+645*IFNULL(`MPE On`,`MPE Off`), `Disk I/O`+`MPEG2-DVD`+`H264-BR`+IFNULL(`MPE On`,`MPE Off`) ASC';
    For static work it is OK, but not when a new top performer submits his data.

    Hi William,
    Per my understanding that you want to count the number of the value in the field wait which is smaller then 15, right?
    I have tested on my local environment and that you can add the calculated field (Count) using the expression as below:
    =IIF(Fields!wait.Value<15,1,0)
    Insert an outside group row and then get the total count by using below expression:
    =SUM(Fields!Count.Value)
    Preview you will get the result like below:
    If your problem stil exists, please try to provide some sample data and the exprect count result you want.
    Any problem, please feel free to ask.
    Regards
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • How to avoid duplications making a SUM calculated field

    Hi, I'm trying to resolve this problem;
    In my dataset (in a custom folder on the administrator) I have a list of tickets (with some attributes), and some of them are duplicated:
    For example
    Ticket_id     Group_id             Ticket_date                Resource_name          Ticket_status      
    5416          100000401       10/12/2007 7:10:31 am                Mr. A                 2
    5416          100000401       9/1/2008 11:00:44 pm                 Mr. A                 2
    57381         100000401       27/12/2007 11:37:11 am               Mr. A                 2
    57381         100000401       15/1/2008 9:33:12 am                 Mr. A                 2
    I want this duplication because I need it when I filter the dataset (using the Ticket_date) with two parameters:
    Ticket_date between lower_limit_date and upper_limit_date
    So, inside the report, regarding the ticket's number, if I take 2 records with the same ticket_id, I have a calculated field where I use the COUNT_DISTINCT and for each couple of tickets the count is always =1; in this way (inside the report) I have the following fields:
    Group_id           Count_tickects   Resource_name  
    100000401              2                    Mr. A                 This is OK !
    Now, if I want to count how many tickets have the status = 2 (it means they are closed), I want to obtain 2 and NOT 4
    I tried to use this calculation (Tickets Closed): SUM(CASE WHEN "Tickets Report #7 COMPL".Ticket Status Id = 2 THEN 1 ELSE 0 END)
    but I always had the result of 4...and this not correct, because the tickets are only 2...
    I also tried to use some analytic function using the OVER PARTITION BY, but I didn't obtain the correct result
    In other words I'd like to achieve this:
    Group_id           Count_tickects   Tickets Closed     Resource_name
    100000401              2                     2             Mr.AAny help will be appreciated
    Alex

    Hi Rod, thanks for the reply,
    I tried this calculation
    COUNT_DISTINCT(CASE WHEN "Tickets Report #7 COMPL".Incident Status Id = 2 THEN 1 ELSE 0 END)
    but it retrieves 1; it's right, because the result of the CASE statement is always 2 (the Ticket_status is always 2, 4 times), but this is not what I expect.
    I'd like to calculate how many tickets are effectively opened (Ticket_status = 2) and this result is *2*, because I have only 2 ticket_id (5416 and 57381); the problem is that inside the data set these two ticket_id's are repeated two times.
    I can't use "Hide Duplicate Rows" because this is only a layout solution (behind I have always the duplication); I can't use more than one aggregate function together because I have the error: Nested aggregate functions are not allowed...
    To resolve this problem, I think, I have to restrict the records which are processed by the CASE statement; instead of pass to the calculation all four records (twice the ticket_id 5416 and twice the ticket_id 57381) I have to pass only two records (one the ticket_id 5416 and once the ticket_id 57381).....but how....???
    Alex

  • Calculated fields in Sharepoint list view

    Hi,
    I have to add a calculated field with formula as
    if the difference between 2 date fields is 0 then i have to add todays date-modifed date.
    how to achieve this in sharepoint list view/column ?
    Aruna

    Hi Aruna,
    SharePoint doesn't allow you to use the[Today] function
    in a calculated column, but there are other work around for this.Please find below link for this.
    http://abstractspaces.wordpress.com/2008/05/19/use-today-and-me-in-calculated-column/
    Regards
    Soni K

  • How to add a calculated field in a list definition (schema.xml)?

    Hello,
    I'm currently trying to add a calculated field to a list definition (schema.xml).
    I have put the following code at the end of the schema.xml for the list I want to create. But when I deploy and activate the feature for the list, it doesn't appear in the list field.
    <Field ID="{EE20EC4B-4216-4259-A84F-C478CE42B70F}" Name="EC_EventsMgmt_CalculatedTime" StaticName="EC_EventsMgmt_CalculatedTime" Group="EC_EventsMgmt" Type="Calculated" DisplayName="Calculated Time" Required="TRUE" Hidden="FALSE" ReadOnly="FALSE" Format="DateTime"> <Formula>=DATE(2009,1,1)+TIME(EC_EventsMgmt_ScheduleHour,EC_EventsMgmt_ScheduleMinute,0)</Formula> <FieldRefs> <FieldRef Name="EC_EventsMgmt_ScheduleHour"/> <FieldRef Name="EC_EventsMgmt_ScheduleMinute"/> </FieldRefs> </Field>
    Could you please give me some help and explain me why it is not working?
    Thanks a lot.

    Hi there.
    If I understand correctly, you create this list within the same feature?
    If so, the list isn't available during the propagation, and therefore the calculated field can't be added.
    If this is the case, then you could work around this by adding a feature activated event handler to your feature and add the calculated field programmatically in that event.
    Hope this helps.
    Regards,
    Magnus
    My blog: InsomniacGeek.com

  • Date VS Date Time in Calculated Field

    I have a property for a patients records called Date of Birth. On the table defining it I saved it as a "date" type and It displays only
    the date on the screen as I would like. For some reason though when I needed a calculated field in the Medication record I added a property to the patient records table that concatenated two fields BirthDate and the Age. I used the following code and then
    added an other screen data item on the medication screen to pull the DoBA property up but got a Date/Time instead of just a Date.
    partial void DoBA_Compute(ref string result)
    // Set result to the desired field value
    result = "DoB:" + BirthDate + " Age:" + Age;
    //This is for the property "Date of Birth and Age"
    //I also used the following code to calculate "Age"
    partial void Age_Compute(ref int result)
    // Set result to the desired field value
    int age = DateTime.Now.Year - BirthDate.Year;
    if (BirthDate > DateTime.Now.AddYears(-age)) age--;
    result = age;
    Images

    I'm using cast instead of Convert.ToInt because the last round to value to upper int if value > 0.5 or to lower if value < 0.5 ( I don't remember now if equal goes to < or > ... read function doc ) while Cast to int do not round the value.
    In my code the day of the birthday
    still
    marks
    the
    previous
    age,
    from the
    day after
    one more year.
    by adding
    +
    1
    age
    increases
    by the
    day
    of the birthday

  • Trouble when attempting to Sum Calculated Field.

    I had to create a calculated field called RI_Limit which contains static data.  (Developers/DBA could not enter it into the database at this time, so this was a work around. 
    The calculated field is setup as such:
    =iif(Fields!Location_LOCATION_NAME.Value = "a", 8, iif(Fields!Location_LOCATION_NAME.Value = "b",2, iif(Fields!Location_LOCATION_NAME.Value = "c",0, iif(Fields!Location_LOCATION_NAME.Value = "d",0, iif(Fields!Location_LOCATION_NAME.Value = "e",1, iif(Fields!Location_LOCATION_NAME.Value = "f",1, iif(Fields!Location_LOCATION_NAME.Value = "g ",0, iif(Fields!Location_LOCATION_NAME.Value = "h",0,iif(Fields!Location_LOCATION_NAME.Value = "i",4,iif(Fields!Location_LOCATION_NAME.Value = "j A",0,iif(Fields!Location_LOCATION_NAME.Value = "k",0,iif(Fields!Location_LOCATION_NAME.Value = "l",7,iif(Fields!Location_LOCATION_NAME.Value = "m",0,iif(Fields!Location_LOCATION_NAME.Value = "n", 1, iif(Fields!Location_LOCATION_NAME.Value = "o",0, iif(Fields!Location_LOCATION_NAME.Value = "p",1, iif(Fields!Location_LOCATION_NAME.Value = "q",3, iif(Fields!Location_LOCATION_NAME.Value = "r",1, iif(Fields!Location_LOCATION_NAME.Value = "s",1, iif(Fields!Location_LOCATION_NAME.Value = "t",3, iif(Fields!Location_LOCATION_NAME.Value = "u",5,iif(Fields!Location_LOCATION_NAME.Value = "v",0,iif(Fields!Location_LOCATION_NAME.Value = "w",0,"NA")))))))))))))))))))))))
    and I setup a textbox with that expression and the numbers fill in correctly with its cooresponding site name.
    However, when I go to sub total or total, I get a much larger number than expected. (See screenshot)
    I have searched the internet on a way to calculate both the total by Location Level 2 and LOB total, but nothing that pertains to the specific issue where by calculated field contains static data.  Nothing I try produces an accurate sum.  Any suggestions?

    Hi Katherine,
    Sorry for taking a few days to reply.
    I tried the suggestion, but it it still not summing my calculated fields.  The total row will calculate my other cells okay but not the calculated fields that I had to add to the report.  When I attempted to write an expression to sum the calculated
    fields I get the following error message. 
    The expression used for the calculated field '=sum(iif(Fields!Location_LOCATION_NAME.Value = "test", 8, iif(Fields!Location_LOCATION_NAME.Value = "test1",2, iif(Fields!Location_LOCATION_NAME.Value = "test2",0, iif(Fields!Location_LOCATION_NAME.Value = "test3",0, iif(Fields!Location_LOCATION_NAME.Value = "test4",1, iif(Fields!Location_LOCATION_NAME.Value = "test5",1, iif(Fields!Location_LOCATION_NAME.Value = "test6 ",0, Fields!Location_LOCATION_NAME.Value = "test7",0,Fields!Location_LOCATION_NAME.Value = "test8",4,Fields!Location_LOCATION_NAME.Value = "test9",0,Fields!Location_LOCATION_NAME.Value = "test10",0,Fields!Location_LOCATION_NAME.Value = "test11",7,Fields!Location_LOCATION_NAME.Value = "test12",0,Fields!))' includes an aggregate, RowNumber, RunningValue, Previous or lookup function. Aggregate, RowNumber, RunningValue, Previous and lookup functions cannot be used in calculated field expressions.
    The Espression for the calculated field I am attempting to sum is the following:

  • Plus signs displaying in calculated field

    I have created a form with a table that has a row that calculates automatically. I then created another form that I copied and pasted the table into. In the second form, when my users display or print the form with Adobe 7.0 Standard, the calculating field now displays a plus sign when nothing is entered to calculate. How do I make the plus sign disappear?

    Actually, that was my first instinct as well, but it is not the issue. No matter how large I make the fields, no matter where I put them (IE not touching any other fields) - the plus signs still display. The really frustrating thing is that they won't display for me, just for other users. I have Adobe 7.0 Pro and we have just updated our users with Adobe 7.0 Standard. The plus signs do not display for me, but they do for the other users. To make the problem even less consistent, I had the exact same table in another form and in that form the users have used that table without any issues. I merely copied and pasted the table into the new form. I can't see any settings that have been changed. Any ideas?? Even a work around would be great.
    Thanks,
    Rebecca

Maybe you are looking for

  • Printing Problem with Phaser 740

    Printing a jpeg file with Tektronix Phaser 740 laser printer, I get about 1/8" to 3/4" printed at the top with nothing else and a separate page stating ERROR: ioerror OFFENDING COMMAND: image STACK: -dictionary- I just installed new printer drivers f

  • No Mouse Shadow after Standby in Clamshell Mode

    Hi, I have a 2.6 Ghz MacBook Pro with a 256 MB GeForce 8600 M-GT running the latest Snow Leopard. I have a 24" monitor attached to my laptop and am running it in clamshell mode. As soon as it goes to standby and I wake it up, my mouse shadow is gone.

  • How important is S.M.A.R.T.?

    There are no S.M.A.R.T. bridgeboards available to build a 4 bay hard drive enclosure for storage. (However you can get FW400 bridgeboards that are S.M.A.R.T. compatible. Why is this? Is it worth the loss in speed just to have S.M.A.R.T.?

  • IDOC Messages

    Hi friends, Part of the project that I am working on is to improve all electronic orders, delivery and invoicing. The generated idoc errors are usually monitored on a daily bases. However, it is intended that after the user/purchase office/warehouse/

  • Recreating This Look

    How do i create this effect: [img]http://i50.tinypic.com/ao0049.jpg[/img] I see it used a fair bit but i cant seem to get anything close to it. Thanks.