Blank out picklist value

Blank out picklist value

Post by c0utt » Sat, 24 Feb 2007 10:42:06


Hi there,

This is an embarassing question to ask, but I'm pulling my hair out.

We have a "Business Recommended" salutation attribute added to the
Contact form. _Usually_ the value is Mr, but there are occasions
where we don't know the salutation so would like it to be blank (or
null). We have the default for the attribute set to "Mr".

I must be going crazy, but I was sure there was a way to reset the
value to null - this _should_ be allowed because the attribute is
"Business Recommended". Alternatively, is there a way to add a null
value to the picklist?

Can anyone advise?

Cheers,

c0utta
 
 
 

Blank out picklist value

Post by TUQ » Sat, 24 Feb 2007 11:59:05

In the Attribute form, there is a "Default Value" drop-down list (under the
"Type" area. The first value if "Unassigned". This will default your picklist
to a NULL value.

But it sounds like you don't have that option, which may mean that you
created a Bit field and exposed it on the form as a Picklist-- as opposed to
a Checkbox or a Radio Button (which would mean you only have "Mr." and "Mrs."
as possible values) If this is the case, you don't have the option to set a
NULL value, since Bit fields must be 0 or 1.

 
 
 

Blank out picklist value

Post by c0utt » Sat, 24 Feb 2007 13:14:29

Thanks MD,

The salutation attribute is a picklist and currently has 6 entries
(Mr, Ms, Mrs etc) and the current default value is "Mr". This is
because in 95% of cases, the contact is a Mr. I really want to know
how I can set the attribute back to the "Unassigned value" if unsure
of the salutation.

In other applications clearing a picklist is done by pressing the Del
key when the picklist has focus, but CRM doesn't seem to allow this.

Any other ideas?

Thanks,

c0utta
 
 
 

Blank out picklist value

Post by TUQ » Sat, 24 Feb 2007 13:44:08

Okay, I see.

To set the default value for the Picklist to Unassigned, you must go into
the Picklist Field's Attribute form. To do this:

1.) From the main CRM Window, click the "Settings" button.
2.) In the Left Navigation Pane, Click the "Customization" icon
3.) Then, click the "Customize Entities" Icon
4.) From the records in the Customizable Entities view, double click the
Entity where this Picklist attribute resides.
5.) In the entity record, click the "Attributes" item in the left navigation
pane.
6.) This displays a list of all the data fields for this Entity. Find your
picklist in that view and double click it.
7.) You'll see a number of details for the data field (schema name, Display
name, data type, all the items in the picklist) most importantly, in the
lower right corner, you'll see a picklist for the "Default Value". It will be
set to "Mr."
8.) Click the picklist and select the top item, which will be "Unassigned
Value".
9.) Click "Save and Close", On the Entity record's top menu, click the
"Actions" button, then select "Publish".

That should set the default value to NULL...
 
 
 

Blank out picklist value

Post by Tml0aH » Sat, 24 Feb 2007 13:46:00

Hi,

OK, so you created a custom Salutation picklist with 6 values in it. When
you go to Attribute Customizations, you will find an option to set the
default value to an 'Unassigned Value' under the picklist values. Select this
option, save and publish.

Do let me know if you have any questions/issues.

HTH,
Niths
 
 
 

Blank out picklist value

Post by Tml0aH » Sat, 24 Feb 2007 13:51:02

Hi,

Since the default value happens to be Mr. 95% of the time, it makes sense to
continue having that as the default value and having the user specifically
select 'Unassigned value' or the blank value 5% of the time!

Or, you can have another option called 'Not sure' or something like that
which can be selected when in doubt about which salutation to use.

Sorry, but you cannot clear a selected picklist option by hitting the delete
button.

HTH,
Niths
 
 
 

Blank out picklist value

Post by c0utt » Sat, 24 Feb 2007 14:01:14

Hi guys,

Thanks for your prompt and detailed responses, but I mustn't be
explaining myself well enough.

Currently the default value is "Mr", but we want the ability to be
able to set this back to "Unassigned Value". When the Contact is
created, we want it to be Mr in 95% of the cases for our end-users but
want to provide the ability to reset the value back to "Unassigned
Value".

As I said, in other applications clearing a picklist is done by
pressing the Del key when the picklist has focus, but CRM doesn't seem
to allow this.

I have a feeling that this is not possible with CRM.

Cheers,

c0utta
 
 
 

Blank out picklist value

Post by Michael Hn » Sat, 24 Feb 2007 19:00:42

CRM assumes that you don't want an empty value if a default option is
specified. This doesn't make sense in your case, so here's a workaround:

In the attribute definition change the default value back to unassigned.
This adds back the empty option in the picklist.
Open the form's OnLoad event and add the following code:

if (crmForm.ObjectId == null) {
crmForm.all.<name of your picklist>.DataValue = "1";
}

It selects the first option in your picklist when inside a create form.
Please check that the value of the "Mr." picklist option is "1". If not,
change the code accordingly.

--
Michael Hne, Microsoft Dynamics CRM MVP

Web: http://www.yqcomputer.com/
Feed: http://www.yqcomputer.com/
Custom Lookup Dialog: http://www.yqcomputer.com/

----------------------------------------------------------

< XXXX@XXXXX.COM > schrieb im Newsbeitrag
 
 
 

Blank out picklist value

Post by c0utt » Sun, 25 Feb 2007 13:02:44

Hi Michael,

Thanks for your response - I was hoping that there was something I had
missed regarding CRM but you've confirmed the behaviour. We came to
the same solution in the end, so I have adopted this for when a new
contact is created.

Thanks,

c0utta