locked
Facing Problem in using calculated field as LookUp Property RRS feed

  • Question

  • Hi,

    I am having 2 lists

    1. List 'A', having columns FName, LName & FullName (is a calculated column with formula =[FName]&" "&[LName]).

    2. List 'B', having UserName which is of type LookUp field asociated to FullName field of List 'A'.

    Up to here it works fine, lookup field populated with the correct values. The values displayed as follows in the dropdown

    Ram Manohar

    Anand Rao

    But now  I am customizing my List 'B' using SPD by using following code for UserName lookup field

    <tr>
    						<td width="190px" valign="top" class="ms-formlabel">
    							<H3 class="ms-standardheader">
    								<nobr>User Name</nobr>
    							</H3>
    						</td>
    						<td width="400px" valign="top" class="ms-formbody">
    							<!--<SharePoint:FormField runat="server" id="ff2{$Pos}" ControlMode="New" FieldName="User_x0020_Name" __designer:bind="{ddwrt:DataBind('i',concat('ff2',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@User_x0020_Name')}"/>
    							<SharePoint:FieldDescription runat="server" id="ff2description{$Pos}" FieldName="User_x0020_Name" ControlMode="New"/>-->
    							<SharePoint:SPDataSource runat="server" DataSourceMode="List" UseInternalName="true" UseServerDataFormat="true" selectcommand="&lt;View&gt;&lt;/View&gt;" id="spdatasource1"><SelectParameters><asp:parameter Name="ListID" DefaultValue="0409330D-0BF9-4FEF-91C8-A012133BBD59" />
    								</SelectParameters><DeleteParameters><asp:parameter Name="ListID" DefaultValue="0409330D-0BF9-4FEF-91C8-A012133BBD59" />
    								</DeleteParameters><UpdateParameters><asp:parameter Name="ListID" DefaultValue="0409330D-0BF9-4FEF-91C8-A012133BBD59" />
    								</UpdateParameters><InsertParameters><asp:parameter Name="ListID" DefaultValue="0409330D-0BF9-4FEF-91C8-A012133BBD59" />
    								</InsertParameters></SharePoint:SPDataSource>
    								<SharePoint:DVDropDownList runat="server" id="ff2{$Pos}" selectedvalue="{@User_x0020_Name}" __designer:bind="{ddwrt:DataBind('i',concat('ff2',$Pos),'SelectedValue','SelectedIndexChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@User_x0020_Name')}" datasourceid="spdatasource1" datatextfield="Full_x0020_Name" datavaluefield="ID" />
    						</td>
    					</tr>
    

    after doing this in my lookup field the values are popualting in the follwing way in the drop down

    string;#Ram Manohar

    string;#Anand Rao

    Why this is happening any solution to this?

    Thanks,


    reddy

    Friday, March 9, 2012 11:38 AM

Answers

  • Hi, the issue is that calculated fields are not supported to be used in lookups. If you search the web you should find more relevant information about that topic. However, what you could do is perform all the calculations client side. Here is a link http://www.graphicalwonder.com/?p=252

    Beware, some scenarios may not be supported by Microsoft.

    Best of Luck.

    • Marked as answer by ramkasarla Monday, March 12, 2012 11:15 AM
    Friday, March 9, 2012 12:34 PM