Setting an integer to null

I have a check box on a form that shows YES or NO when displayed as a column 
in that forms view(s).  I'd like it to show YES, but in the case of NO I'd 
like it to be null.  I've tried using the OnChange event for that field and 
the OnSave event for the form to test if it is not 1 and if so set the 
DataValue = null.  When I go back to the view it still says No.  Any advice 
how to make this work?
0
Bob4289 (354)
7/24/2008 2:18:00 PM
crm 35858 articles. 1 followers. Follow

4 Replies
429 Views

Similar Articles

[PageSpeed] 7

Hi Bob,

Try the following script:
if(crmForm.all.new_bittest.DataValue==false)
{
crmForm.all.new_bittest.DataValue=null;
crmForm.all.new_bittest.ForceSubmit=true;
}

Replace new_bittest with the schema name of the checkbox.

HTH,
Niths

"Bob" wrote:

> I have a check box on a form that shows YES or NO when displayed as a column 
> in that forms view(s).  I'd like it to show YES, but in the case of NO I'd 
> like it to be null.  I've tried using the OnChange event for that field and 
> the OnSave event for the form to test if it is not 1 and if so set the 
> DataValue = null.  When I go back to the view it still says No.  Any advice 
> how to make this work?
0
Niths (71)
7/24/2008 3:11:06 PM
Thanks Niths.  I had code similar to this in the OnSave event.  I also tried 
yours.  Neither seems to work.  When I save and close the Account form the 
view shows No and not null.  When you tested your code did you get a null 
value?

"Niths" wrote:

> Hi Bob,
> 
> Try the following script:
> if(crmForm.all.new_bittest.DataValue==false)
> {
> crmForm.all.new_bittest.DataValue=null;
> crmForm.all.new_bittest.ForceSubmit=true;
> }
> 
> Replace new_bittest with the schema name of the checkbox.
> 
> HTH,
> Niths
> 
> "Bob" wrote:
> 
> > I have a check box on a form that shows YES or NO when displayed as a column 
> > in that forms view(s).  I'd like it to show YES, but in the case of NO I'd 
> > like it to be null.  I've tried using the OnChange event for that field and 
> > the OnSave event for the form to test if it is not 1 and if so set the 
> > DataValue = null.  When I go back to the view it still says No.  Any advice 
> > how to make this work?
0
Bob4289 (354)
7/26/2008 6:55:00 PM
Hi Bob,

I tested the code before replying to you and yes, I did get a null value in 
the list view when 'No' was selected (when 'Yes' was not selected).

Maybe there's some other code in the onSave event that is messing with 
this.... can't be sure till we take a look at it. Do you have any other 
script in the onSave event?

Niths

"Bob" wrote:

> Thanks Niths.  I had code similar to this in the OnSave event.  I also tried 
> yours.  Neither seems to work.  When I save and close the Account form the 
> view shows No and not null.  When you tested your code did you get a null 
> value?
> 
> "Niths" wrote:
> 
> > Hi Bob,
> > 
> > Try the following script:
> > if(crmForm.all.new_bittest.DataValue==false)
> > {
> > crmForm.all.new_bittest.DataValue=null;
> > crmForm.all.new_bittest.ForceSubmit=true;
> > }
> > 
> > Replace new_bittest with the schema name of the checkbox.
> > 
> > HTH,
> > Niths
> > 
> > "Bob" wrote:
> > 
> > > I have a check box on a form that shows YES or NO when displayed as a column 
> > > in that forms view(s).  I'd like it to show YES, but in the case of NO I'd 
> > > like it to be null.  I've tried using the OnChange event for that field and 
> > > the OnSave event for the form to test if it is not 1 and if so set the 
> > > DataValue = null.  When I go back to the view it still says No.  Any advice 
> > > how to make this work?
0
Niths (71)
7/27/2008 10:38:00 AM
I checked the OnSave event and this is the only code.  I know the view is 
refreshing because when I toggle check and uncheck, the view responds and 
shows Yes and No.

"Niths" wrote:

> Hi Bob,
> 
> I tested the code before replying to you and yes, I did get a null value in 
> the list view when 'No' was selected (when 'Yes' was not selected).
> 
> Maybe there's some other code in the onSave event that is messing with 
> this.... can't be sure till we take a look at it. Do you have any other 
> script in the onSave event?
> 
> Niths
> 
> "Bob" wrote:
> 
> > Thanks Niths.  I had code similar to this in the OnSave event.  I also tried 
> > yours.  Neither seems to work.  When I save and close the Account form the 
> > view shows No and not null.  When you tested your code did you get a null 
> > value?
> > 
> > "Niths" wrote:
> > 
> > > Hi Bob,
> > > 
> > > Try the following script:
> > > if(crmForm.all.new_bittest.DataValue==false)
> > > {
> > > crmForm.all.new_bittest.DataValue=null;
> > > crmForm.all.new_bittest.ForceSubmit=true;
> > > }
> > > 
> > > Replace new_bittest with the schema name of the checkbox.
> > > 
> > > HTH,
> > > Niths
> > > 
> > > "Bob" wrote:
> > > 
> > > > I have a check box on a form that shows YES or NO when displayed as a column 
> > > > in that forms view(s).  I'd like it to show YES, but in the case of NO I'd 
> > > > like it to be null.  I've tried using the OnChange event for that field and 
> > > > the OnSave event for the form to test if it is not 1 and if so set the 
> > > > DataValue = null.  When I go back to the view it still says No.  Any advice 
> > > > how to make this work?
0
Bob4289 (354)
7/28/2008 4:06:23 PM
Reply:

Similar Artilces:

Documents & Settings vs. Users folders
OS: Vista Business; upgraded from Win XP Pro SP3. Joined to a WinSer 2003 domain. I just noticed that I have (near) identical files and folders in my C:\Documents and Settings folder and the C:\Users folder. Is this because it was an upgrade? Is there a way to eliminate one of them to free up some HD space? -- Mike Webb Platte River Whooping Crane Maintenance Trust, Inc. a conservation non-profit (501 (c)(3)) organization Wood River, NE In article <8B0B66B9-1E62-479D-BC74-BF79A50895E6@microsoft.com>, Mike_in_Nebraska@newsgroup.nospam says... > > OS: ...

Outlook does not d/l entire imap message, though it is set to
I am using Outlook 2007 and am having trouble getting it to consistently download an entire message instead of just the headers. I went into Define Send/Receive Groups to specify the particular folder in question, and selected it as being one for which all items incl. attachments should be completely downloaded. However, many times it only grabs the header. Is this a bug? And how can I make it always download the complete item? Thanks, Garrett "Garrett" <Garrett@discussions.microsoft.com> wrote in message news:710C17CC-B12C-452F-BF95-DC2317E572A6@microso...

Can I set up a calendar lookup for date selection
Is it possible to lookup a calendar for date selection on a cell. I cannot find any reference to it in the help. try this url http://www.fontstuff.com/vba/vbatut07.htm ================= "Tangoxray" <Tangoxray@discussions.microsoft.com> wrote in message news:72D4DB63-1D7F-477A-93C7-2F767A207B26@microsoft.com... > Is it possible to lookup a calendar for date selection on a cell. I cannot > find any reference to it in the help. ...

Extract account set info in FRx?
Does anyone know how to extract all the account set definitions in FRx to a file? I've set up so many of these it would be nice to be able to dump them off so I can keep better track of them. -- Bud Cool, Accounting System Manager HDA, Inc. Hazelwood, MO GP 9.0, SP2 ...

How do I set a Word doc to always print manual feed?
In Word 2003, you'd go to page setup, paper source. I can't find anything comparable in 2007. I print a lot of labels & letterhead & need this. The dialog is the same - click the arrow bottom right of the Page Setup Group on the Page Layout tab. -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><<> <>>< ><<> <>>&...

How do I set up an out of office auto response?
Hi: I'm a new user to Outlook and I was trying to initiate an "out of office response"/auto reply for one of my colleagues. Can you help me out? Thank you so much. JenniferC <JenniferC@discussions.microsoft.com> wrote: > Hi: > I'm a new user to Outlook and I was trying to initiate an "out of > office response"/auto reply for one of my colleagues. Can you help > me out? Thank you so much. http://www.slipstick.com/rules/autoreply.htm -- Brian Tillman Yet another stupid question what is the OOA & how do I enable it? "Brian Tillman&qu...

I need a rectangular label set for a DVD case.
not the square ones... but one that's rectangular, approx 7.25 x 5.25 inches. Thanks!! debbieT debbie@truesoaps.com ...

Select Records that fall in an external set of ranges (subquery)
HiI have not done subqueries before so I am a bit confused. I have twotables1 - Phone Numbers - (converted to be numeric) (with other fields forlater) and2 - Exchange codes - multiple entries for code with 3 fields -Exchange name (duplication) - Start Range and End Range.I want to return a list of phone numbers that fall into the range fora certain exchange.For example - MRSPOO has 4 entries in the Exchange Table with 4distinct ranges. 200-299, 307-788, 997-1102 and 2036-6698. I would like to be able to return all the phone numbers for a singleexchange code that I would select (using a query...

security setting for PO comments
Using GP 9.0 i am trying to allow my purchasing people to add comments to the PO. Apparently they do not have security access to the comment area and I can not figure out specifically where in advanced security this clearance is granted. Typically, they should be able to select from pre-written comments on the PO form. To create new comments, they need access to the Create New Comment window. Sorry, I dont have a copy of 9 on my laptop to give you the exact window location in AS but this might get you headed in the right direction. -- Richard L. Whaley Author / Consultant / MVP 200...

How can I set the padding to zero if the document is pdf?
<li><a href="Doc1.pdf" target="DocFrame">Doc1</a></li> <li><a href="Doc2.htm" target="DocFrame">Doc2</a></li> I have statements like the above. DocFrame is an iFrame element that is inside a Div with nonzero padding set. For an html document that looks like a letter this put white space around the text that looks like the margin you normally would see in a letter. But for a pdf document it does not look good. How can I set the padding to zero if the document is pdf? I have no idea how...

Setting up email to work
I created a webpage for my company and when I created the send button I went into Format Form Properties and selected Submit and then went to Form Properties. I then selected Send Data to me in Email and entered in a valid Email. However when I go to test the web page and I enter in the required information and I click Send I get a The Page Cannot Be Displayed error and HTTP 405 - Resource not allowed. What do I do? Reference: "Publisher web publication forms 101": http://msmvps.com/blogs/dbartosik/archive/2006/01/07/80564.aspx DavidF "Russ" <Russ@discussions.mic...

Relocate My Outlook Look / Excel Settings
I have changed my system because of some unavoidable reason. I was using Windows 2000. And still using win 2000 How can I transfer my outlook settings (look, style, groupings, contacts, calendar, OE settings with Newsgroups ...in short all settings related to outlook & outlook express). Also If possible kindly tell me how can i transfer MS Office settings in general to my new system. Please please any suggestions / advices regarding relocation from old-system to new-system will be highly appreciated. Regards, Murtaza Hi Murtaza, That's a pretty good situation, two systems that w...

Customization option disappears under settings
Sometimes when we are logged onto Web crm we can see the customizations button on the navigation pane under settings. Other times it has disappeared altogether and the only way to get it back is to delete the temporary internet files. Does anyone know of a permanent solution for this? I assume this is CRM4. Do you also have CRM Outlook client on this machine? I have found that the Customisations option is not always avaliable in the outlook client, and if you have opened outlook before opening the web, the option will not be in the web client. You can change this my editing the isv.c...

Setting x-axis crosses with VBA
I have a chart that at the moment has a vertical range from -70 to -92. I'm trying to set the horizontal axis to cross at the minimum value, in this case -92. Using With ActiveChart.Axes(xlValue) .Crosses = xlMinimum It crosses at -70. If I use xlMaximum I get the same thing. Using .Crosses = xlCustom .CrossesAt = -92 it crosses at -92. however, I need it to be dynamic so the x-axis labels stay below the data field. Am I using xlMinimum in a place it cannot be used? Any help will be appreciated. In the format axis dialog, there is no way to specify tha...

How turn on Classic Pivot Table Settings
How does one turn on Classic Piviot Table Setting from Excel 2007. ...

set admin account like in Exch 5.5
Hi, In Exchange 5.5 I can set an admin account where all ND mail (where no receip are made for) is delivered to.But where do i find/set that adres in Exchange 2000? Grtz If you go to the Messages tab on your SMTP Virtual Server you can specify the address in the "Send copy of Non-Delivery Reports to" field. -- Mark Fugatt Microsoft Exchange MVP www.exchangetrainer.com www.msexchange.org "E_nono" <e_nono-nospam@hotmail.com> wrote in message news:bqg9nf$okp$1@news1.tilbu1.nb.home.nl... > Hi, > > In Exchange 5.5 I can set an admin account where all ND ma...

Set the color of grid depend on variable
I'd like to set the color of cells (sheet1) [A1...A8] -> Red [A9...A28] -> Green [A29...A44] -> Blue [A45...A54] -> Red .... based on data from sheet2 Start Stop Color 1 8 Red 9 28 Green 29 44 Blue 45 54 Red ..... How to do it ? -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Radoslaw Krzyzan , pl.communicator@radek http://www.communicator.pl , ICQ 4336523 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Hi for only three colors have a look at 'format - conditional Format'. For more than 3 conditions you need VBA -- ...

Syntax to write a null value inside a sql Insert string?
Is there a way to represent the null value as a string (destination: varchar column) the way that the following string represents a null value for a date? Public Const cNullDate As Date = #12:00:00 AM# Writing to an Access 2003, (conversion) table with VS2005 in VB.NET. Within the table is a field named VSubType1 with a validation rule of: "In ('P','O') Or Is Null" The declare/move/insert statements look like this (shortened example): Dim intRecNbr As Integer = 0 Dim VSubType1 As Object (defined as Text 1 column in Access) Dim V1...

Unable to set incoming and outgoing email server addees
The pop3 and smtp server addees specified by my ISP do not work in Outlook; tell me they can't be found. They work in Outlook Express! -- Outlook begins searching for incoming and outgoing, then come the error messages: can't be found. (Have no problems with email with Eudora6 or even the very occasional use of Netscape.) Is there a workaround? Thanks. George Walker You must have a slight typo in the server settings. Try Importing the settings from OE and see if they work. You can also open OE and copy and paste the settings to OL. "George Walker" wrote: > The p...

How do I set up an e mail account with 2 different providers
I have 2 internet providers, sbcglobal.net and myvine.com. I want to be able to send and receive e mail messages from both on my Outlook Express how can i set that up. This newsgroup is for support of Outlook 97, 98, 2000, 2002 & 2003 from the Office family for Intel PCs. For Outlook Express (OE) support try posting in one of these newsgroups: microsoft.public.inetexplorer.ie4.outlookexpress for OE 4.x microsoft.public.windows.inetexplorer.ie5.outlookexpress for OE 5.x http://support.microsoft.com/newsgroups/default.aspx?ICP=GSS3&NewsGroup=microsoft.public.windows.inetexplorer.ie...

How do I set up a correlation table?
I am working with survey results. I need a correlation table that represents the data taken. excel has the CORREL function rh555 - > I am working with survey results. I need a correlation table that > represents the data taken. < A) CORREL worksheet function B) Correlation tool of the Analysis ToolPak add-in - Mike www.mikemiddleton.com ...

Setting up separate network on same wire with RRAS
I want to set up a phantom network, that is, a copy of our existing network computers, eg print server, file server, exchange. I want to put them all on a couple computers as Virtual machines. This is for testing purposes. I will create the machines and then backup the original servers and restore them to the Virutal Machines. The key issue for me is how can I keep them separate. Eg that the one network does not see the other network. So far I have restored a print server to the phantom network. The host is on our 10.1.0.x network. The VM is has two Virtual nics. One is the outsit...

Copying over null values in DB
Hi, I'm saving data entered by a user. If the user does not enter a value in the field I would like to insert null value. I want to do this so that I don't have to write a seperate query for each column and various columns may be left blank by the user. Instead of entering a blank space I want to enter null (the columns in the db are nullable). How can I do that? Thanks. "mavrick_101" <mavrick101@discussions.microsoft.com> wrote in message news:9DE76512-1C74-4D71-9CC3-9159E3B0FB0C@microsoft.com... > How can I do that? Firstly, you'll ne...

How to set top-margin of CEdit control?
CEdit::SetMargins( UINT nLeft, UINT nRight ); sets the left and right margins of this edit control. However, I need to set top-margin of CEdit control. Is it possible? try the function CEdit::SetRect. "Animesh Rawal" <animesh.rawalREMOVETHIS@patni.com> wrote in message news:A24E1FB8-C5CD-4F1F-97CC-2EFBECE5A0B6@microsoft.com... > try the function CEdit::SetRect. Note that this function will only work for multiple line edit controls (MSDN). Tom. ...

XSD/Schema: Who do I set a default for a date-type element?
If I specify a default value in an .xsd-File like this ... <xs:element name="element1" type="xs:dateTime" minOccurs="0" default="2004-02-10T00:00:00.0000000+01:00" /> .... and try to build a dataset with xsd /d Dataset.xsd, i receive an "value doesn't fit the datatype" error. I tried already formats like "2001-01-01" or "2000/01/01" with the same result. Does someone know the right format? This is my original file: <?xml version="1.0" encoding="utf-8" ?> <xs:schema id="Dataset1...