Just another weblog

Rubbish in filtered dropdownlist from calculated field

Posted by onlydarksets on March 19, 2008

I’d love to create a filtered list from a calculated field, but I’m hitting a problem where it is prepending “string;#” to every stored value.  This is similar to this post:

Of course, try searching for “string;#” in any search engine.  They all strip off the semi-colon and hash symbol, leaving the search pretty worthless.

The code snippet is:

<SharePoint:DVDropDownList runat=”server” id=”ff1{$Pos}” DataSourceID=”fdsConsultants2DS” DataTextField=”ConsultantName” DataValueField=”ConsultantName” selectedvalue=”{@Title}” __designer:bind=”{ddwrt:DataBind(‘i’,concat(‘ff1′,$Pos),’SelectedValue’,’SelectedIndexChanged’,’ID’,ddwrt:EscapeDelims(string(@ID)),’@Title’)}” /></td>

Where DataValueField is the calculated field in the lookup table (and SelectedValue tells it to store DataValueField).

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: