How to use field values in OnChange Events???

hi all,

in an OnChange-Event of an user defined field (named CFPcountry,
Picklist) I would like to catch the new value and write it to another
field (address1_country).

How do i adress this fields? The following code doesn't work:

crmForm.address1_country.Value = event.srcElement.returnValue;


I would like to transfer the textcontent of the picklist field (e.g.
Germany, France, United States etc...), not the index value.

Thanks in advance,
Dennis
0
dennis
9/10/2004 3:05:04 PM
crm 35858 articles. 1 followers. Follow

3 Replies
1165 Views

Similar Articles

[PageSpeed] 13

The returnValue expando contains the integer representing the selected item
while value contains the actual string value.

Jason Hunt
Technical Product Manager
Microsoft Business Solutions CRM

This posting is provided "AS IS" with no warranties, and confers no rights.

"Dennis Bushuven" <dennis.bushuven@web.de> wrote in message
news:87901b66.0409100705.669fb119@posting.google.com...
> hi all,
>
> in an OnChange-Event of an user defined field (named CFPcountry,
> Picklist) I would like to catch the new value and write it to another
> field (address1_country).
>
> How do i adress this fields? The following code doesn't work:
>
> crmForm.address1_country.Value = event.srcElement.returnValue;
>
>
> I would like to transfer the textcontent of the picklist field (e.g.
> Germany, France, United States etc...), not the index value.
>
> Thanks in advance,
> Dennis


0
Jason
9/10/2004 7:58:43 PM
Jason,
thanks for your reply. Unfornately your hint does not work.
crmForm.CFPcountry.Value does not deliver a text string.
In order to simulate debugging, i changed the onChange-event jscript
like this:

window.alert(crmForm.CFPcountry.Value);

Then, when onChange is fired, the message box only shows "undefined".
Do you have another hint for me?

Dennis




"Jason Hunt \(MSFT\)" <jasonhun@online.microsoft.com> wrote in message news:<ejkKgE3lEHA.2340@TK2MSFTNGP11.phx.gbl>...
> The returnValue expando contains the integer representing the selected item
> while value contains the actual string value.
> 
> Jason Hunt
> Technical Product Manager
> Microsoft Business Solutions CRM
> 
> This posting is provided "AS IS" with no warranties, and confers no rights.
> 
> "Dennis Bushuven" <dennis.bushuven@web.de> wrote in message
> news:87901b66.0409100705.669fb119@posting.google.com...
> > hi all,
> >
> > in an OnChange-Event of an user defined field (named CFPcountry,
> > Picklist) I would like to catch the new value and write it to another
> > field (address1_country).
> >
> > How do i adress this fields? The following code doesn't work:
> >
> > crmForm.address1_country.Value = event.srcElement.returnValue;
> >
> >
> > I would like to transfer the textcontent of the picklist field (e.g.
> > Germany, France, United States etc...), not the index value.
> >
> > Thanks in advance,
> > Dennis
0
dennis
9/13/2004 10:26:50 AM
Dennis,

You may need to watch case - the function is "value", not "Value".

For exampe:

    crmForm.address1_country.Value=crmForm.CFPcountry.value;

Will set the value of the fax field to the value (text value) in the 
picklist.  If you wanted to get the numeric value associated with the 
picklist instead, then you would use:

    crmForm.address1_country.Value=crmForm.CFPcountry.returnValue;

If you use .Value, then you will get "undefined" as you have experienced.


Stephen


"Dennis Bushuven" <dennis.bushuven@web.de> wrote in message 
news:87901b66.0409130226.33f3a8bc@posting.google.com...
> Jason,
> thanks for your reply. Unfornately your hint does not work.
> crmForm.CFPcountry.Value does not deliver a text string.
> In order to simulate debugging, i changed the onChange-event jscript
> like this:
>
> window.alert(crmForm.CFPcountry.Value);
>
> Then, when onChange is fired, the message box only shows "undefined".
> Do you have another hint for me?
>
> Dennis
>
>
>
>
> "Jason Hunt \(MSFT\)" <jasonhun@online.microsoft.com> wrote in message 
> news:<ejkKgE3lEHA.2340@TK2MSFTNGP11.phx.gbl>...
>> The returnValue expando contains the integer representing the selected 
>> item
>> while value contains the actual string value.
>>
>> Jason Hunt
>> Technical Product Manager
>> Microsoft Business Solutions CRM
>>
>> This posting is provided "AS IS" with no warranties, and confers no 
>> rights.
>>
>> "Dennis Bushuven" <dennis.bushuven@web.de> wrote in message
>> news:87901b66.0409100705.669fb119@posting.google.com...
>> > hi all,
>> >
>> > in an OnChange-Event of an user defined field (named CFPcountry,
>> > Picklist) I would like to catch the new value and write it to another
>> > field (address1_country).
>> >
>> > How do i adress this fields? The following code doesn't work:
>> >
>> > crmForm.address1_country.Value = event.srcElement.returnValue;
>> >
>> >
>> > I would like to transfer the textcontent of the picklist field (e.g.
>> > Germany, France, United States etc...), not the index value.
>> >
>> > Thanks in advance,
>> > Dennis 


0
Stephen
9/13/2004 1:48:04 PM
Reply:

Similar Artilces:

negative values causing column title problem
How do I get the Column titles x axis lables at he bottom of the chart field when have negative values It s friday and this is killing me. Select the axis Choose Format>Selected axis On the Patterns tab, for Tick Mark Labels, select Low TFrisch wrote: > How do I get the Column titles x axis lables at he bottom > of the chart field when have negative values > > It s friday and this is killing me. -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html hey thanks - boy was thaqt annoying >-----Original Message----- >Select th...

Change the numeric value of a dropdown to text value
I'm trying to email the values of form fields that I have created in a form. So basically what I want to do is in the Subject I want to take the "value" of the dropdown called dropdown1 and put it in the subject. It is working but it is putting the numeric value instead of the text value. How do I convert it. Thanks much! Use the .Result, not the .Value -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "Wo...

Insert CRM Icon (i.e. contact) into Outlook menu bar and use hyperlink
hy, my customer doesnt like to access the contacts, accounts etc via the folder structure in outlook client - much too complicated.. he wants a "shortcut": I inserted the CRM icon for contact list view into the Outlook Menu bar and added a hyperlink, problem: with the following hyperlink: outlook://Microsoft%20CRM/Workplace/Customers/Contacts a new instance of outlook is opened. so after klicking 5 times on my contact ican, I have opened outlook 5 times... if I add the hyperlink: \\CRMserver\.... etc... I dont open the contact in the outlook view but open an internet explorer wind...

using common data in multiple sapreadsheets
I would like to copy the results from one range of cells in one worksheet of one workbook, to another cell in another worksheet in another workbook, can this be done? Sure if both workbooks are open: workbooks("book1.xls").worksheets("sheet1").range("a1:b99").copy _ destination:=workbooks("book2.xls").worksheets("sheet2").range("c9") If you paste to one cell, then the copy|paste command will react just like you did it manually. It'll expand the destination range to be the same shape as the original range. Travis wrote: ...

Using visio to design website
I'm using Visio Professional 2002. I discovered (to much excitement) that it has shapes to create a web site map. However, I'm quite lost as to how to use them to design/ document my site layout. So far, I've been using powerpoint and org chart to document my storyboard but if Visio is more powerful, I would really love to learn how to use it. Is there an online tutorial on this? Many thanks. Hi Melissa, Use the Conceptual Web Site template and shapes to design a site that does not exist yet. Use the Web Site Map template and shapes to discover and map a site that alrea...

Excel menus are locked when opening an XLS file using IE
A financial website (www.investors.com) is publishing daily an Excel spreadsheet. When I click on the link, Internet Explorer asks me whether I want to save the file or open the file. When I choose "Open" the Excel file shows up nicely in my browser ... the IE menus change to Excel menus. Problem: I can only use the File menu choices; the other menus are LOCKED. Why? I'm using Office XP on Windows 2000 Professional. At work I'm using Office 2002 and things work fine. Is this an Office XP issue, or is ther somewhere a setting that I have to teak? Any help is mu...

Repositioning a control using Visual Basic
I want to reposition some controls when I click a button and I'm not having much luck. Any help is appreciated. The code I am using is Me!Frame28.Top = 5.8646 It repositions the contro to the top of the form. If I try to add the inch sign ("), of course it is looking for additional code to end the statement. '"' doesn't work either. Thanks. "scott" <scott@discussions.microsoft.com> wrote in message news:1682A689-62C0-4788-934E-C9EA5FC4AECF@microsoft.com... >I want to reposition some controls when I click a button and I'm not having &...

Index using a defined name array
I have defined 3 arrays using DefineNames: Boys_11_12 Boys_13_14 Boys_15_16 I then have defined a Combo dropdown with the following choices: Boys_11_12 Boys_13_14 Boys_15_16 When the user selects the Boys age group using the Combo dropdown, I then use the selection in an Index function: Index(Boys_(one of the three),...) I get an error when using the Combo dropdown, but it works fine when I type in the array name directly into the Index function. Its as if it knows the array when typed in, but not using the Combo dropdown. I created the Combo dropdown by typing in the arr...

How do I find which forms have a particular field which is blank?
I have created a database using Access 2007 but it really confuses me. I used to have Access 2000 and it was really easy to create a query which found all the forms which had the "Date Completed" field blank, so i could find which records were still ongoing. It even made a little list for me in a seperate sheet. I have no idea how to do this in Access 2007 and the help forums don't make much sense to me. Can anyone help? many thanks, Bunximo. Open up the database. Go to the Create tab. Next go to Other box. Select Query Design. Pick out the table that has...

DTD Entity Events
Hello, I have a confusion regarding how the Parameterized and Predefined ENTITIES are resolved while parsing a DTD. Do we get events for the same or are they internally replaced and no events generated. Kindly Help Maansi * Maansi Gupta wrote in microsoft.public.dotnet.xml: >I have a confusion regarding how the Parameterized and Predefined ENTITIES >are resolved while parsing a DTD. Do we get events for the same or are they >internally replaced and no events generated. You should be able to write your own entity resolver. ...

Using an Object from a Current form for Criteria in a Query
I am using Access 2000. I have a Command Button on a form that is designed to preview or print that customer's invoice. I use a Pop-Up Dialog Box. The end user will supply 2 pieces of data in this Dialog Box. This data, together with the Customer ID from the current form. will provide the 3 necessary pieces of info to pass on to the query, and eventually the report, that creates the invoice. I suspect that the "Me." or "Me!" "command" or "action" must be used, but am not clear about how to use it. Perhaps someone can give me so...

useing arrows to move
new to excel and just imported some address's in and was able to move with arrow and now it will not work........ moves whole screen rather than to the next cell. what has changed, I want to be able to move useing arrows........... Carman, Try your Scroll lock key. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "carman" <carman@discussions.microsoft.com> wrote in message news:0A214C5B-9513-4AE3-81B1-1DC26280812A@microsoft.com... > new to excel and just imported some address's in and was able to move w...

Pivot Table row fields
Is there any way to uncheck all of the boxes at once in my row field drop down box. Example: I have dragged years into the row field. A drop down arrow shows but everything is checked. I do not want to have to uncheck these one at a time. Thank you for your help. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ There's some sample code here that shows/hides items in a pivot table: http://www.contextures.com/xlPivot03.html#Show97 Clys wrote: > Is there ...

Leading Zero as value not appearance
When i use formatting cell custom with 0000 i manage to add leading zero but the problem is the leading zero only as appearance. Is it possible to make it as value in the cell Format the cell as Text. Select the Range>>Do Right Click>>Format Cells>>Number>>Category>>Text and give ok. Now input your leading zero value in the text formatted range. But the Values are not treated as real numbers and it is considered as Text Values. Remember to Click Yes, if this post helps! -------------------- (Ms-Exl-Learner) -------------------- "zy...

How to use/extract only a portion of a field
Help, oh please help using Excel 2007. If it is possible, I need to know how to use only a portion of a cell. Please keep your answer simple if possible. I'm pretty much a novice as I read answers of the forum:) My project is to create computer login cards for elementary grade students. For example, I've been given a file with Column 1 is a six digit student number (987654) Column 2 is the student's first name (Jane) Column 3 is the student's last name (Doe) What I need is to create is a combination of that information so it will read JD987654. Is there a type of formul...

Use of the SUBST command to reduce breakage of Access links
[Apologies for an apparent cross posting -- I accidentally posted this to .forms instead of .queries and I'm now posting correctly] One of the great failings of the past 20 years of Microsoft's dominance has been the failure to implement good file system redirection. XP today is almost as dependent on absolute paths as it DOS 2.1. [1] In the world of Access this manifests as broken links to external data sources. I use links very extensively in my data management work, a typical project may contains dozens of query files with links to dozens of data tables distributed over one or mor...

Help with counting user entered text values
Hi, Version: Excel 2000 Situation: In Column G, I will have testers entering in their initals. I would like to display the tester's initals in column H of another worksheet with the number of times that set of intals appeared in column G on column I of the other worksheet. The catch is that I do not have a list of the testers initals ahead of time, so I'll need to pull them from column H. Thanks for any and all help in advance, David Hi David, H10: DAL i10: =COUNTIF(G:G,H10) or if you don't want to see 0 if H10 is empty I10: =IF(H10="","",COU...

Search in multiple columns using VLOOKUP?
Hi, I'm looking for a formula to find a row in a spreadsheet with two matching fields which returns the value of a field in a certain column in that row. VLOOKUP only supports searching in one column as far as I know. Let me give you an example to clarify my request. Please read the following text in a non-proportional font like Courier New. Worksheet A A B C D 0 4 7 0 3 6 1 0 7 5 0 6 Remarks: either column A or B is always zero, and the other one non-zero. I need the formula to use the value of the field which is non-zero. Further on, the value of the column C has to match...

How do I change the size of a text form field box in Word?
I f more text is typed in the text form field box then its standard size the other form fill boxes to the right all move over to accommodate the additional text. Is there a way to increase the text form field box? Place your form fields inside (border-less) table cells whose dimensions are fixed. -- Stefan Blom Microsoft Word MVP "Blink" <Blink@discussions.microsoft.com> wrote in message news:383D7E9E-5A0E-4F3A-9586-CAC98B0CD776@microsoft.com... >I f more text is typed in the text form field box then its standard size >the > other form fill...

using reply with OE
This is a multi-part message in MIME format. ------=_NextPart_000_0090_01C44484.89544670 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I know this is an Outlook forum, and my question is about OE, but it = involves Outlook, so I wondered if I might be able to get some help from = here. I'm using Outlook Express for my online class. We do nearly all of our = class work through class room newsgroups. I have the newsgroups set up = alright in OE. I have Office 2000 (with Outlook) installed on my Win2K = PC. I have 3 mail accounts set u...

Event ID 9582 #3
Hi, I have ran the ExBPA tool and implemented all the recommendations on the critical issues section, as well as some in the warnings list. The system is a Xeon, 2GB memory, Windows Server 2003 SP1, Exchange 2003 SP2 I have implemented the /3GB swith with Userva=3030. I restart the server and DO NOT get a 9665 "memory settings are not optimal" message. Yet after a couple of days I get 9582 errors. I read somewhere regarding the "NoPAE" switch regarding Physical Address Extension can mess around with the memory, but I also read that after SP it was not a problem Can s...

Creating a self deleting executable using .NET
I am trying to create an application for the Windows Mobile 5.0 (or higher) platform. One of the features of the application is that it has a panic button that automatically closes down the application and deletes the executable. I have been trying to find a technical solution for this feature but it has proven to be much harder than I thought. The problem is that the physical executable file is locked and can't be deleted as long as the executable is running. I found some quite interesting articles explaining the problem in more detail and also explaining some possibl...

using Query Based distribution groups between domains
I am trying to use query based DG's for passing world wide notificatons across domains. I have a global QBDG containing QBDG from our 3 child domains. When I am sendin an email to this DG the email only reach the recipients in the domain where the global dg is placed, none of the the recipients in the other child domains gets the email. When I do a preview on the global DG the child domain qbdg is visible so it looks as if it would work. Any ideas appreciated. Sounds like an issue with the expansion server. Have you considered setting the expansion server to try and work through t...

Outlook works fine after using Outlook Express once...????
Here's an interesting problem : I have set up Outlook and Outlook Express to the same settings for my POP3 account. When I try to send an email from Outlook I get the error : 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1) Even if I try to "Read" before "Sending", which is a common remedy for this problem, Outlook still wont work.. Emails are downloaded fine, but still I cannot send an email. However, if I use Outlook Express to send/receive an email first, Outlook works fine afterwards.... Any ideas ? I thought that Outlook and O.Expre...

Update field within a text box
I'm using Word 2007. I created a template with a REF field in a text box that refers back to a bookmark created with an ASK field earlier in the document. When I create a new document using this template, all of the ASK and FILLIN prompts come up, but the REF field in the text box does not update automatically. If I click in the text box and hit F9, it will update, but I would like it done automatically. Is this possible? TIA David No, even Ref fields that aren't in text boxes don't update automatically. You can go to Print Preview and back to update all the ...