Delay in field calculation appearing

Hi all
Apologies but my coding skills are a bit dated.
I have three fields A,B and C
User puts a number into A and B calculates the value of this multipled by a number using a bit of Javascript
var field2 = this.getField("CPDNo").value;
event.value = field2 * 25;
Now C does some checks on the value of B to determine whether to use a minimum value or a maximum value here
var field1 = this.getField("cpdval").value;
if (field1<"100"){event.value = "100";
} else if (field1>"7500"){event.value = "7500";
} else event.value = field1;
What I find is B is always correctly calculated but C will wait until I click into another field before performing its calculation...
What am I doing wrong here??
thanks
george

If the contents of the field mscval is a number you should not be comparing it to string value.
Are you getting any errors in Acrobat's JavaScript console?
Are you sure your comparisons are in the correct order for what you are trying to accomplish?
I would have coded this as follows:
var field3 = this.getField("mcsval").value;
// default value
event.value = field3;
if (field3 < 100) {
// field3 less than 100
event.value = 100;
} else if (field3 > 7500){
// field2 greater than 7500
event.value = 500;
or
var field3 = this.getField("mcsval").value;
switch(true) {
// field3 is less than 100
case (field3 < 100) :
event.value = 100;
break;
// field3 is greater than > 7500
case (field3 > 7500) :
event.value = 500;
break;
// all other values
default:
event.value = field3;
break;

Similar Messages

  • MS Project 2007 - Help with custom field calculation for grouped by dates view

    Hello 
    I am trying to creat a view that counts number of students in courses (while # Students is a custom field that is filled manually and courses are tasks).
    The view should be grouped by Quarters, Months, and weeks (Calculated custom Text fields)
    The weeks groups are displayed by the start day of each week.
    For example:
    The view counts how many students are in courses in a specific week/month/quarter.
    This is the group by definition:
    Those are the fields calculations:
    “WW_Start” field calculation:
    (Year([Start]) & "  W " & Format([Start],"WW") & " " & "   [" & Datevalue(ProjDateSub([Start],CStr(Weekday([Start])-1),"Standard")) & "]")
    “MM” field calculation:
    Year([Start]) & "  M " & Format([Start],"MM")
    Basically it works but it doesn't cover a situation where a course is more then a week.  
    Lets say that the duration of the task is 12 days, the task should appear on 3 different weeks groups.
    But what i did puts the tasks only in the group that shows the first week of the task.
    How can i change my calculations or my view so that in the second, and third week of the task it will also show the task and it's attributes.
    For example:
     - "UV5 ACM" task should also be in W 45 not just W 44.
    Anyone has an idea how to do that?
    Ofir Marco , MCTS P.Z. Projects

    Hi
    First, thanks for the comment "nice neat groups" :)
    I think you understood correctly what is my issue.
    Second, about your question:  the class have the same number of students during the course period.
    It will have 10 students even if the duration is 1 day or 10 days.
    if you look at the basic gantt chart you will see a row like this:
    Task name        Duration        Num_Students     Resource names (Instructors)
    Course YYY       10d                10                       
    Instructor X
    it is an attribute on the task, not the assiment.
    When i group by dates (Weeks, months, quarters) or by another field (can be course type for example) i the students are summed in the task summary level for all tasks.
    Lets say i group by all the tasks (Classes) that are in the 1st quarter, and lets say for the example that there are 3:
    Task 1 -->  5 students
    Task 2 --> 10 students
    Task 3 --> 7 students
    Then, the group by summary should count:
    Quarter 1 - 2014:   22 (students)
    Task 1 --> 5
    Task 2 --> 10
    Task 3 --> 7
    By the way, it doesn't matter if the version is project 2007,2010, 2013, the logic is the same.
    Hope it helps and i'll be glad to have some ideas or evan get examples for solution in a project file by e-mail.
    Ofir Marco , MCTS P.Z. Projects

  • Field calculation doesn't auto update

    Hello -
    I have a complicated PDF Form that has several pages of fields that are totaled and averaged on the last page. I'm using Acrobat X on the Mac.
    Basically, on the last page there are 2 subtotal fields that are calculated based on other (direct-entry) numeric fields in the document. Those 2 SUBTOTAL fields update automatically when I change the direct-entry fields. So far so good.
    But, then I have a FINAL AVERAGE field that is supposed to average the two subtotals. But when I update one of the direct-entry values, the subtotals update but the final average does not.
    Here's where it gets screwy:
    If I try to manually enter a valid number (validation is OK from 0-3) in one of the SUBTOTALs, the subtotal does not change but this forces the FINAL AVERAGE field to update correctly.
    If I try to manually enter an invalid # (such as 5) in either of the 2 SUBTOTAL fields Acrobat won't let me enter that number, but it WILL recalculate the final average using that number and give me the wrong answer.
    I have tried locking the fields, turning validation on and off, but neither has any effect.
    I'm using the AVERAGE calculation function. I wonder if the problem is that I'm averaging a field that is itself using the Average calculation.
    There are only 2 fields being averaged. I could just add them and divide by 2, but that is not an option in the field calculation, unless I write a javascript, which I haven't learned how to do yet. So, I can't tell whether that would fix the problem. Is there a way to write a custom calculation formula other than using javascript?
    Thanks for any help you can give!

    The field calculation order is most likely not correct. You just have to set the order to whatever makes sense for your form.
    To do this in Acrobat 10, go to form editing mode (Tools > Forms > Edit) , and then select: Tasks > Other Tasks > Edit Fields > Set Field Calculation Order

  • Profit centre field is appearing as display in MM02

    Hi folks!!
    In t. code MM02, I need to fill the filed profit centre in material master. but the field is appearing as disply only.
    while in filed selection, for material type this field is required, and for MM02 this filed is optional.
    The stock is also zero, no po or pr lying pending open.
    Please suggest how can I make this filed writable.
    Best regards.

    Go to Transaction code 'OMS9"
    or Path
    SPRO - Logistics General --> Material Master -- > Maintain Field Selection fro Data Screens.
    Give 48 under Field selection group, press enter
    GO to Field reference for MM01 and MM02, make field as Optional Entry, don't change MM03 .

  • Changing an input field's appearance to Optional in an ESS WD Java scenario

    This thread is posted to help customers with a common user based issue with ESS
    SAP may deliver some fields in ESS iviews as mandatory however you may not want some fields to be mandatory and may want the iview display to guide the user appropriately
    Often delivered mandatory fields have an Asterisk denoting this field as a mandatory
    requirement for data entry in the ESS scenario
    The purpose of this post is to show how the Asterisk can be removed and therefore indicate to the user that an entry is not required
    There may be 2 ways to do this
    1) As of a SP9 in ERP 6.0 press Ctrl and Right mouse button on the field in the PCD preview of the   iview you wish to modify. In the Personalization options there is a "Mark as Mandatory" option please select "Not Personalized" and save then review the iview to see if the asterisk is removed
    2) If this does not have the desired effect or you have a lower SAP version or SP level you will need    NWDI to make the change. You will require knowledge of NWDI to make the change -->
    Open the required scenario in NWDS
    Position cursor on Required field and right click and select u2018Propertiesu2019
    Go to the u2018Propertiesu2019 tab
    Change property field u2018Stateu2019 from u2018Requiredu2019 to u2018Normalu2019
    Save the changes
    As this field now appears as optional to the user you also have to ensure the
    ECC business logic does not reject a user who does not populate the field with data - therefore you will need mark the field as optional in
    V_T588M      
    V_T588MFPROPS
    These changes also affect entry of data into this field in PA30 - HR Administrators or users with R3 access will therefore have the same user experience (i.e field is not mandatory)
    If you have issues maintaining V_T588MFPROPS appropriately you can insert an overide into V_T588MFPROPC
    If you find the ESS scenario still requests an entry in the field it could be that this field is an essential
    or core part of this particular ESS scenario and therefore the model expects data to be populated in this field or it could also be that previous or subsequent fields are dependant on an entry in that field - In this case you may need to make a coding change to the model and/or change the business logic of dependant fields as well.
    Edited by: Stuart Campbell  on May 8, 2009 1:07 PM

    Thank you stuart.

  • "non-responsive script" -- appears on screen/ extreme slows down or freeze/field can appear as many as 7 times each time i click on stop "non-responsive script"/each time the field returns immediately on screen.Frustrating!I dislike freeze or slow...

    I researched the net and a lot of people are having the same problem, but did not find answers.
    1. I turn on the PC and experience very slow to open firefox.
    2. Then a field pops up "Non-responsive script may be what is slowing down your computer". There is computer language written in the field. In this field are 2 small fields to click on: "continue" or "stop script". I can click on stop or continue numerous times and no reaction. Then I click on close no reaction. Then finally it goes away only to pop back up as many as 6 or 7 times. It can occasionally take as long as 20 min. to open the browser. Other times the computer is just slowed down.
    3. There appears to be no pattern as to when this "non-responsive script" field can appear. Even when I first turn on the PC and have not opened the browser yet it can appear in the upper left hand corner of the screen.
    4. Any suggestions or help you could provide would be appreciated.

    I researched the net and a lot of people are having the same problem, but did not find answers.
    1. I turn on the PC and experience very slow to open firefox.
    2. Then a field pops up "Non-responsive script may be what is slowing down your computer". There is computer language written in the field. In this field are 2 small fields to click on: "continue" or "stop script". I can click on stop or continue numerous times and no reaction. Then I click on close no reaction. Then finally it goes away only to pop back up as many as 6 or 7 times. It can occasionally take as long as 20 min. to open the browser. Other times the computer is just slowed down.
    3. There appears to be no pattern as to when this "non-responsive script" field can appear. Even when I first turn on the PC and have not opened the browser yet it can appear in the upper left hand corner of the screen.
    4. Any suggestions or help you could provide would be appreciated.

  • SHCess field not appearing after using utilization tab in excise invoice

    Dear All,
    SHCess field not appearing after using utilization tab in excise invoice.The other fields and values releated to SHCess are appearing.
    Please give the inputs.
    Regards,
    deepti

    issue resolved

  • New material specifi field not appearing in LSMW objects

    Dear all,
    Within the conversion process, we have to load "Z" specific fields whose values are stored in the MARC table but that are not appearing in the standard LSMW object 0020 - Material master. Is there a specific step or action to be taken (or object to be selected in LSMW) so these fields would appear in the structure ?
    Thanks for your answer,
    Cheers

    Hi Olivier
    Standard object 0020 gives fields only available in standard tables MARA , MARC , MBEW, MAKT . I too faced this problem for ML based fields in accounting & costing views ( as these fields are not in MBEW they are in CKMLHD). The said Z field if it does not exist in MARC it cannot be seen through std object. U need to do a saperate recording to upload this field. I dont see any other option to my knowledge.U can up load remaing fields through the std object 0020 & create a saperate recorded LSMW only for this Z field.
    regards
    prasad
    reward if useful

  • HT4623 i have updated to ios7 on my iphone 4s but the keybard has become extremely unresponsive and i cant write mails/texts/searched etc without a considerable delay in the text appearing. How can i reinstall ios7????

    i have updated to ios7 on my iphone 4s but the keybard has become extremely unresponsive and i cant write mails/texts/searched etc without a considerable delay in the text appearing. How can i reinstall ios7????

    litemotiv wrote:Nice entrance Bruce Lee JR, welcome!
    Thanks~!! I usually like my presence to be known and not just sit in the dark I wanna become apart of the community~!! Actually, every activity I do, I like to get involved~!!
    cybertorture wrote:
    wow man, u really enjoy this ? ... well u ll see here many ppl like yr self who feels @ home here after a looooooong distro hopping
    well be welcome here and long live ARCH !
    LONG LIVE ARCH~!!!!! Hek yeah I enjoy, especially since I was a major power user of XP & strictly XP. There was everything I ever needed. The only thing was that, if there was an Open-Source alternative, I would take it. I didn't know much about Linux other than that it ran EXTREMELY well as a server just as FreeBSD does. Once I finally took the time to google Linux, read about ditributions,open source and read blogs and read community comments etc.. I was like" I gotta be apart of this~!!" because XP was the shizz. But now Linux, more specifically, ARCH~!!!!!

  • Is it possible to make a calculated field only appear when the result is greater than 0?

    I am using Adobe Acrobat X Standard.  I have created a form that has caculated fields.  However, the fields always show the "$0.00" when it doesnt have anything to calculate.  I would only like a result to appear in this field when the result is greater than 0.  Is this possible?

    The use of currency and percentage signs always behave this way since the display format is a character string and not a plain number.
    You will have to use some custom JavaScript in the Custom JS calculation, the custom format format, or the validation script.
    There is not a lot of documentation for this, but Acrobat JavaScripting Guide Version 6 has some infromation about usin the AFNumber_Format built-in function.
    If your users are using version 8 or below, you will need to adjust the format of the field.

  • Added fields not appearing in the DSO transformations.

    Hi,
    I have added three new info objects into data fields in the DSO then activated and not appearing added fields in the transformations.
    Please suggest me,
    regards,
    Jayapal.

    Hi Jayapal,
    i dont know whether it would help you...you can give a try on it.
    Instead of deleting the Transformation, just delete the mappings if any in the transformation.
    Goto DS->Fields Tab-->In the Column Template info Object. Try mapping corresponding IO with the Source IO.
    Then it will show a pop up give Copy . Activate the DS.
    Goto Info Provider>Select the Transformation> If it is active-->reactivate it by clicking the Pencil Icon with glass and click activate icon.
    If its not active, then reactivate it again by clicking the Pencil Icon with glass.
    Let me know if it Works... Cheers
    Regards,
    Syed
    Edited by: shameer83in on Nov 20, 2009 12:10 PM

  • PO field not appearing while posting Vendor Invoice

    Hello,
    While posting an entry using FB01/ F-43, for posting key 31(Vendor Invoice), despite making Purchasing Document (Purchase Order) field optional in the field status group of both the posting key 31 as well as the Reconciliation (GL) Account, the Purchasing Document field is not appearing. Please provide the solution if it's possible to get this field while posting the entry.
    Thanks and Regards,
    Sumita

    If you try to book vendor invoice through F-43 or FB01 t codes, then, the system would always show PO open for invoice verification.
    In case of a PO, IV should always be done through MIRO t code.
    Thanks.
    VS

  • How do I add a set value to a form field calculation?

    I'm creating a form where I need a set value added to the sum of other editable fields - e.g. Field A + Field B +$125 = Sum
    For the addition of Field A and B I've been using the pre-set functions in Adobe X, but I'm clueless as to how to add the $125 to the sum calculation. I'm absolutely new to Java, so I'd need something I can cut and paste.
    Thanks!

    One last question:
    I have existing code for a Submit by Email form that has a subject line and message content. I'm trying to add a second email to it but can't seem to figure out how.
    this.mailDoc({
    bUI: false,
    cTo: "[email protected]",
    cSubject: "Here is my Renovation Draw Request",
    cMsg: "You will find my completed Renovation Draw Request attached. I’m excited to move forward, so please contact me as soon as possible."

  • How to force field to appear in input structure in content conversion

    Hi all,
    I am doing file content conversion in sender File adapter. Here is the structure
    Header
    Body
       field1 - length 2
       field2 - occurrence 1:1, length 3
       field3 - length 2
       field4  length 2
    Trailer
    Here is the fixed length file that is inputed into XI
    <b>header22   2211trailer</b>
    field2 occrence is 1:1 and as you se from the file example field2 from the body is empty(just space).But  When I do the content conversion I don;t have this field showing up in my structure!??!!
    I want to make sure that field2 appears even as empty field because that is screwing my mapping!?
    Can you please have any idea how to make sure that field is in my input structure when I pass spaces?Can I force it somehow?
    Thanks all.

    Hi Jon,
    Yes you are right.
    For Ex: ur XML is
    <1>a</1>
    <2>b</2>
    and sometime is there is no value ur FCC will become
    <1>a</1>
    So what you have to do is in the message mapping take the source element
    if <2> exists then <2>---->Target
    else
    <2>---->Constant(space)
    and this "exists" is a standard function in NodeFunctions.
    Regards,

  • Problem with non currency field calculations to become curr

    Hi guys,
    Is there a problem if I have a QUAN field and DEC field forming to become a CURR field? I mean a have this computation below:
    v_var1 = v_var2 * v_var3.
    where v_var1 type QUAN, v_var2 type DEC and v_var3 type CURR...
    would it incur any problem with the calculations?
    Thanks!

    Hi,
    Did you try ?
    Worked for me flawlessly
    tables bseg.
    parameters : qty like bseg-menge,
                       amt like bseg-dmbtr.
    data : result like bseg-dmbtr.
    result = qty * amt.
                write result.
    The only issue is that the result will be rounded upto 2 decimals.
    But if you declare result as
    data : result(13) type p decimals 3.
    Then there will be no issues.
    regards,
    Advait
    Edited by: Advait Gode on Oct 3, 2008 3:59 PM

Maybe you are looking for

  • Store data in R/3 without page refresh

    Dear BSP-Masterminds, we need to store data in R/3 without a recurrent page refresh. The problem is that our engineers are using PDA's and the page refresh is taking too much time. The engineers are changing equipment data on the PDA's. Every time th

  • Asset class SANA1100 cannot be used in company code SANA

    hi.every one ........... im facing a problem when creating asset classes system showing the following error ,Asset class SANA1100 cannot be used in company code SANAi checked the screen layout rules.number ranges and account determination every thing

  • When will iOS Safari be able to edit posts?

    I had hoped with the release of iOS 5 and the redesign of Safari that I would be able to edit my posts on my iPad 2. But unfortunately that's not the case. It's really embarrassing to make a simple typo in a post, then not be able to correct it. SInc

  • Disconnecting when running off battery

    Everytime i remove my power cord from my MacBook Pro, i have trouble keeping ichat connected, my ineternet it fine, everything else stays connected, ichat is the only problem. It will usually stay connected for only 10 minutes or so, and when it disc

  • Css struts problem

    Hi there: <link href="<%="theme/layoutdisplay.css"%>" rel="stylesheet" type="text/css"> this is how I define my css. my project is situated in ../webapps/projectname/ <a href="pm_meeting.do?action=edit&id=<%=id%>"><img src="<%="img/edit.gif"%>"></a>