Subtract two numbers

hi 

I have a stock table with fields like qty rcvd, allocated and left.
i want to put in a java script which says left = rcvd - allocated.

these fields are type int in the crm entity.
below is what i have but doenst work. can someone please help
var QR = crmForm.all.new_quantityreceived.DataValue;
var A = crmForm.all.new_allocated.Datavalue;
var QL = crmForm.all.new_quantityleft.DataValue;

if (crmForm.all.new_quantityreceived.DataValue !=null)
{
QL = QR - A;
}

regards and thanks in advance
ridhima
0
Utf
8/13/2007 12:04:00 AM
crm 35858 articles. 1 followers. Follow

2 Replies
886 Views

Similar Articles

[PageSpeed] 47

1. Typo: var A = crmForm.all.new_allocated.Datavalue; 
    This should be: var A = crmForm.all.new_allocated.DataValue; 

2. You are missing: crmForm.all.new_quantityleft.DataValue = QL;

-- 
David Jennaway - Microsoft Dynamics CRM MVP
Web: http://www.excitation.co.uk



"Ridhima Sood" wrote:

> hi 
> 
> I have a stock table with fields like qty rcvd, allocated and left.
> i want to put in a java script which says left = rcvd - allocated.
> 
> these fields are type int in the crm entity.
> below is what i have but doenst work. can someone please help
> var QR = crmForm.all.new_quantityreceived.DataValue;
> var A = crmForm.all.new_allocated.Datavalue;
> var QL = crmForm.all.new_quantityleft.DataValue;
> 
> if (crmForm.all.new_quantityreceived.DataValue !=null)
> {
> QL = QR - A;
> }
> 
> regards and thanks in advance
> ridhima
0
Utf
8/13/2007 8:34:00 AM
Thanks heaps David :) it works perfectly :)

"David Jennaway" wrote:

> 1. Typo: var A = crmForm.all.new_allocated.Datavalue; 
>     This should be: var A = crmForm.all.new_allocated.DataValue; 
> 
> 2. You are missing: crmForm.all.new_quantityleft.DataValue = QL;
> 
> -- 
> David Jennaway - Microsoft Dynamics CRM MVP
> Web: http://www.excitation.co.uk
> 
> 
> 
> "Ridhima Sood" wrote:
> 
> > hi 
> > 
> > I have a stock table with fields like qty rcvd, allocated and left.
> > i want to put in a java script which says left = rcvd - allocated.
> > 
> > these fields are type int in the crm entity.
> > below is what i have but doenst work. can someone please help
> > var QR = crmForm.all.new_quantityreceived.DataValue;
> > var A = crmForm.all.new_allocated.Datavalue;
> > var QL = crmForm.all.new_quantityleft.DataValue;
> > 
> > if (crmForm.all.new_quantityreceived.DataValue !=null)
> > {
> > QL = QR - A;
> > }
> > 
> > regards and thanks in advance
> > ridhima
0
Utf
8/14/2007 12:12:01 AM
Reply:

Similar Artilces:

using 2004 on two comps. simultaneously #2
Version: 2004 Operating System: Mac OS X 10.4 (Tiger) Processor: Power PC hi My wife and I both use Office 2004. We cannot use Word simultaneously. If one of us is using it, the other's closes. Is there a workaround for this? Thanks C Silverman Los Angeles, CA On 10/31/09 7:45 PM, in article 59b7fb66.-1@webcrossing.caR9absDaxw, "Chuck_Silverman@officeformac.com" <Chuck_Silverman@officeformac.com> wrote: > My wife and I both use Office 2004. We cannot use Word simultaneously. If one > of us is using it, the other's closes. Is there a workaround for this? No...

date subtraction difficulty
I'm trying to subtract dates, to calculate time duration. I'm subtracting column A from column B into column C. Column C is formatted 'm "mos", dd "days"' and columns A and B are formatted 'mm/dd/yy/@' Unfortunately each of the durations is 1 month too long. That is, if the real duration is 4 days, column C will display '1 mos, 4 days' Any clue what I'm doing here? Thanks much. On Tue, 18 Jul 2006 11:58:10 -0500, Peter <facetious_nickname@hotmail.com> wrote: >I'm trying to subtract dates, to calculate time durati...

two users
In OE I have two identities, mine and my wifes. I want to do the same in Outlook, but I can't see how? ed See http://www.slipstick.com/outlook/olshare1.htm navigator wrote: > In OE I have two identities, mine and my wifes. I want > to do the same in Outlook, but I can't see how? > > ed ...

Subtracting Cells formatted with Date AND Time to get hours?
Thanks in advance for the help. Is it possible to subtract 2 cell that are both formatted as mm/dd/yyyy h:mm to just have it subtrac the times to get a total # of hours between the 2. For example, A is 1/1/05 13:00 and B1 is 1/2/05 14:30. I'd like C1 to give me th total of 25:30. This forum is always a great place for help. Thank again in advance for your help. mcr =B1-A1 and format as [hh]:mm -- HTH Bob Phillips "mcr1 - ExcelForums.com" <miles@milesreed-dot-com.no-spam.invalid> wrote in message news:Oy629ATgFHA.4032@TK2MSFTNGP10.phx.gbl... > Thanks in advan...

Converting functions into numbers
For example, using the function =2*3, I will get a 6 in the cell. Now I would like to copy the 6 into another cell. Using the usual copy, I will copy the function. Is there a way that I can copy the 6 as a number and not as a function -- vesuviu ----------------------------------------------------------------------- vesuvius's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2857 View this thread: http://www.excelforum.com/showthread.php?threadid=48237 Sorry to bump the board, but I really need help fast -- vesuvius ----------------------------------------...

Reset recently used files in Publisher to higher number
I want to set the number of recently used files in Publisher to nine from the four that it shows me at present. I can't find anywhere to change this. I'm using Publisher 2003. I don't think you can do that in Publisher but I'm sure that someone will chirp up if I'm mistaken. -- JoAnn Paules MVP Microsoft [Publisher] "Ken" <Ken@discussions.microsoft.com> wrote in message news:07E5ABDF-9C44-4091-8620-1AA38931EF91@microsoft.com... >I want to set the number of recently used files in Publisher to nine from >the > four that it shows me at prese...

I need to import data into two tables...?
I have a database that is basically a contact database. A Client's table and a Contact's table. We will be recieving data in a spreadsheet that consistes of contact data, and the children's name of the person bing contacted. I'd like to upload the children's names into the memo field of the Contact table. My VBA skills are very basic. Most of the time I look for basic examples I modify just a little to make things work. I'm guessing this will take more skill then coping and pasting, but I was hoping someone could a least point me in the right direction or maybe ...

Changing negative numbers to zero
Hi all, Is there any way to automatically change any negative numbers in a cell to zero? For a spend down spreadsheet that I am developing, any negative numbers will be zero. I could not find a format or function that would do it. I would like to avoid the =if(.......>0,......,0) route because the formula in the cell already contains an if argument and it is already too complicated. Would an array formula work? I haven't worked with them too much. Any advice is appreciated. TIA Chet Hi, If those numbers (negative as well as positive) are the outcome of a formula, you may mo...

subtracting units of time
Hi there, I am trying to keep track of my hours at work, as I need to make up a day I spend at hospital during the course a month. I have put together a sheet (sort of a cut-down version of my department's timesheet), with day, month, in and out. What I want to do is subtract 30 minutes from each standard work day, so I end up with 8 (or however many hours worked) minus my half hour lunch break. Any help would be greatly appreciated. Regards, Glenn Auckland, new Zealand Glenn Stick 0:30 in a cell and name it lunch_break. Then use = A1-lunch_break, where A1 contains your times be...

Synching Outlook 2000 on two computers
First I copied the .pst from computer A and took it to computer B. Then I just tried to use the File/Open PST file on computer B and I get two Inboxes, two Sent Items, etc. If I do the next day I get another Personal Folders tree. How can I get it to not do that and just replace what's there with the newer .pst file? Thanks, Alias Alias wrote: > First I copied the .pst from computer A and took it to computer B. Then > I just tried to use the File/Open PST file on computer B and I get two > Inboxes, two Sent Items, etc. If I do the next day I get another > Personal Fol...

Two Blackberry Servers running at same time
We have Exchange 2003 SP1 installed with Blackberry Server Ent 3.8. We are switching carriers and to BES 4.12. Can I have two BES running at same time as I switch users to different BES and not affect Exchange 2003? Thanks. as long as you don't have the same PINs/Users on the 2 servers you'll be fine. "Tadik" wrote: > We have Exchange 2003 SP1 installed with Blackberry Server Ent 3.8. We are > switching carriers and to BES 4.12. Can I have two BES running at same time > as I switch users to different BES and not affect Exchange 2003? Thanks. > >...

Dividing Worksheet into Two Columns
Greetings, Is there a way to, in page setup or somewhere else, divide the worksheet itself into two columns, much like Word document? I have a measly four column spreadsheet going but it's long (over 1400 rows). Looks crappy on print preview - could easily fit two sets of these four columns on a single page with 0.75" borders. Thanks, Ray B. Try this: File>Page Setup>Sheet tab>Options>Printing Shortcuts tab>Pages per sheet: change to 2 pages per sheet "Office User" wrote: > Greetings, > > Is there a way to, in page set...

Compare two dates
Hi,. I would like to compare two dates in the same row and return a true or false statement. How do I do this? Could you please elaborate your query. Do you mean? With dates in A1 and B1 =IF(A1=B1,"dates are same","dates are not the same") If this post helps click Yes --------------- Jacob Skaria "Dave" wrote: > Hi,. I would like to compare two dates in the same row and return a true or > false statement. > > How do I do this? =A1=B1 -- David Biddulph "Dave" <Dave@discussions.microsoft.com> wrote in...

Setting up two accounts
I want to setup two accounts but also want separate outlook folders so one person can download there files without being mixed into the others account. I am running win2K and outlook 2003. paladin61@comcast.net wrote: > I want to setup two accounts but also want separate > outlook folders so one person can download there files > without being mixed into the others account. I am running > win2K and outlook 2003. Then set up two diferent Windows users. Each one will have their own set of Outlook files. "Gordon" <gordonbp1@yahoo.invalid> wrote in message ...

How to compare two dataset?
In myapp, I can create two datasets: [dstServer1] and [dstServer2]. They are coming from two tables which are in two different SQL server: [Order1] (in server1) and [Order2] (in server2). These two tables have the same data structure. How to code to compare two dataset and then insert difference into another table without using linked server? -- Message posted via SQLMonster.com http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/201004/1 VB.NET/C# do not have such possibility? Loop thru the sets and compare them on the client "aspfun via SQLMonster.com" &l...

Count the number of orders in a given month
Hi, First, I want to thank anyone who is able to help me in advance! I a working in Office XP (Excel 2002)... latest updates... I have an excel data sheet where I tally sales... I am trying to coun the number of orders in a given month. Each order is on a separate ro and one column is the date it was placed... the date format i 01-01-2003... I need to count the number of orders placed in 01-2003 02-2003 03-2003 etc... from 2002 to 2004... I hope this is detailed enough to give an answer It is set up something like this: Date Order # Amount 1/17/2003 6430 1/29/2003 6431 2/1/2003 643...

two colored graph
i regularly create line graphs that include current data and projecte data. i can change the line colors but i would like to change th color of the grids so that the projected portion of the graph i different than the grids for the curent data. using the gradient fil option is not acceptable. any way??? thank -- jfillio ----------------------------------------------------------------------- jfillioe's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1623 View this thread: http://www.excelforum.com/showthread.php?threadid=27645 You could construct custom gridli...

Lost serial Number For Office v.X
How can I get my serial number for my software? I have registered it, but now need to install it on my new computer. Thanks There is no serial number for Office. The Product ID, which is necessary to obtain product support, can be found by opening an Office X application, going to <Application> -> About <application>, and looking under your name and organization. If you're referring to a lost CD key, you can request a new one from Microsoft Product Support Services. You'll need proof of ownership to get one. <http://support.microsoft.com/default.aspx?scid=fh;EN-U...

Compare two lists
I’m comparing two lists in Excel 2002. Each list has 5000+ rows and 5 columns. Each record (row) has a unique ID number. So first I need to compare the two columns that have that ID number and tag anything that’s on one list and not on the other. Next, I need to compare the other columns in the rows that correspond to matching ID numbers and tag any data that is different. I think I can manage to do one of these tasks, but I can’t do both. I’ve tried sorting the lists by the ID number so the two lists will correspond, but once I’ve found a record in one list that’s not on the other...

Format number
I need to do calculations on a column of numbers I have imported(copy & paste). The calculations do not work and I have discovered that the numbers have a leading blank space. I have tried to format as number but does not work. If I edit each cell and remove the leading blank space all is well. This is too time consuming. How can I format or edit more effeciently? Try using Edit>Replace Select the range of cells that hold the numbers Goto the menu Edit>Replace Find what: enter a space by hitting the space bar Replace with: nothing, leave this blank Replace All ...

How To Join Two Files & Sort
My first time using Excel - grateful for help. I have two files of names/addresses, mailing lists. I need to join these two files together so I can then sort them and remove duplicate names. How do I join/insert/merge two Excel files, please? Thank you. Bright Spark Hi Bright Spark for all things "duplicates" check out http://www.cpearson.com/excel/duplicat.htm I think you'll find everything you need there, however feel free to post back if you require further assistance Cheers JulieD "Bright Spark" <BrightSpark1901@Hotmail.com> wrote in message new...

text and numbers
I was given a spreadsheet having a bunch of entries that appear to be numbers, but when I try to do arithemetic with them, I get a #VALUE error. I tried using the VALUE function to convert them to numbers, but the result of this function is also a #VALUE error. Tracing the error shows it is trying to evaluate VALUE(" 1,291"). I tried using the TRIM function to remove leading blanks, but that did not work. I used the CODE function to find out what the characters were and find the leading characters have a CODE value of 160 (a space I think should be 32). How do I convert t...

Two Lookup Values?
I have a worksheet with columns for Dates-Salesman-Customer and another worksheet with the distance between each salesman and customer. Each salesman will go to several different customers and more than one salesman will go to each customer. I want to bring the distance from the other worksheet over to the first worksheet but it requires me to have two lookup values, Salesman and Customer. Can you have two lookup values in a Vlookup formula?? Thanks, Bob =SUMPRODUCT((RngA=Salesman_Cell)*(RngB=Customer_Cell)*(RngC)) RngA = List of Salesman on your Distance/Salesman/Cust sheet RngB = List...

color coding custom number formats #2
I'm attempting to color code a series of numbers using the custom number format in the FORMAT MENU. I need to color code four numbers (or ranges of numbers) 10%, 50%, 90% and 100% Currently I have: [Yellow][=>0.01] 0%;[Green][=>0.05]0%;[Blue][=>0.09];[Red][=>1]0%;@ But I can't get it to work. Any ideas why? Couple of reasons: - Custom formats can only have 3 numeric format fields, not 4. - your [Blue] format doesn't have a numeric format. - if you have numeric ranges in your custom format, the ranges must encompass all numbers. In your format string, the ...

Subtract
On sheet A, I have column: A1(product name) A2(quantity). When I copy a row with the data in above columns to sheet 2, it must automatically deduct 1(one) from A2. Can you please help? Thanks. --- Message posted from http://www.ExcelForum.com/ Hi this would require VBA (using event procedures) Do you really want to go this way. Note: excel is IMHO not well suited for maintaining an inventory -- Regards Frank Kabel Frankfurt, Germany > On sheet A, I have column: A1(product name) A2(quantity). > > When I copy a row with the data in above columns to sheet 2, it must > auto...