Column Ordring of Additional Lookup Fields
Hello, I have looked for information on this, but I can't even find someone with the same issue much less a solution. Introduced in SharePoint 2010 was a nice feature to include additional fields of a lookup list on the list where the lookup column resides. It's a very easy-to-use feature that can be found on the lookup column settings. However once you add these fields they are automatically thrown at the bottom of the column order and I cannot find a way to reorder them. This looks ugly on the display page. If I was to move the lookup column itself to the top of the column order, it's related fields are still sitting at the bottom. This gets even worse when you have multiple lookup columns on a list. Does anyone have a solution to this? I'm surprised I can't find anyone that has posted about it... Thanks - Jeff Barton
June 25th, 2012 5:40am

Typically, if you don't see the 'Column Order' link in the Settings page, then you need to click on the Content Type link, which will allow you to order them. Else, turn off the 'Allow Management of Content Types" in Advanced settings to get the Column Order link to return. Either way. But, I'm going to go play with this and see what else I can learn, in case something major got changed.Steve Clark, MCTS | Twin-Soft.com
Free Windows Admin Tool Kit Click here and download it now
June 25th, 2012 8:47am

Thanks for your reply, but this is not my issue. I can find the Column Order link just fine. My issue is specific to the 'additional fields' of a lookup column. They are not available for ordering. Thanks- Jeff Barton
June 25th, 2012 2:45pm

Hi Jeffery, You can reorder the columns in views. To achieve this foolow below steps: Open List setting page.Go to Views Section at bottom of the page.Reorder the columns in default view. Let me know if you face any issue.Ashish Mishra|MCTS,MCPD in SharePoint 2010| Twitter:https://twitter.com/#!/707Mishra| Blog: http://www.sharepointblog.co.uk/author/ashishmishra/
Free Windows Admin Tool Kit Click here and download it now
June 26th, 2012 7:11am

The best I can see is to alter the view and change the order there.Steve Clark, MCTS | Twin-Soft.com
June 26th, 2012 9:33am

Ashish, Thanks for your reply, but again this is not my issue. I am referring to the order of the "additional" lookup fields on the Display Forms, not the order on List Views. - Jeff Barton
Free Windows Admin Tool Kit Click here and download it now
June 30th, 2012 9:35pm

Steve, Yes, I know of that solution, and I have used it in the past (assuming you are talking about forms and not views). However the only way to modify the order of the fields on the forms is to use a Custom List Form. The issue I have with those is that the form will no longer be updated if you add or modify a field on the list. This is bad for my clients as they would be stuck with whatever page I build for the life of their web site. - Jeff Barton
June 30th, 2012 9:47pm

I'm trying to setup my own example. In your first post, what did you mean by "the display page"? Reason I ask is that I can get it to show in AllItems, but not dispform.aspx. Tell me more about your setup and how you created your display page. Steve Clark, MCTS | Twin-Soft.com
Free Windows Admin Tool Kit Click here and download it now
July 4th, 2012 3:22pm

I am talking about the out-of-box dispform.aspx. You don't have to do anything special to it. - Jeff Barton
July 4th, 2012 5:01pm

Darn. I can't get it to show in either DispForm or EditForm. Wonder what I'm doing wrong ?? I'll play with it more today.Steve Clark, MCTS | Twin-Soft.com & Easy Bins Dumpster Rentals of Northern VA. (Specializing in driveway-sized roll-off dumpsters.)
Free Windows Admin Tool Kit Click here and download it now
July 5th, 2012 10:29am

I was using a built-in task list, which has content types. It doesn't appear that this option plays well with content types, so I ditched that example. Instead, I created a custom list called test and added a lookup field [Project]. (I have a custom list 'Project', which has [title] and [dept].) In test, I added the dept as part of the lookup additional fields. In SPD, I started a new file based on Test's Dispform.aspx. I removed the List View Web Part, and added a custom one. (Insert / SharePoint / Custom List Form) I copy and pasted the [Project] field make another row. From there, I opened the "Data Source Details" pane, to see whether or not it recognizes [Project:Dept], and the good news is that it DOES. If you look in the pane, you'll see that it shows the beginning of the XPath info. (I don't really know what that means, but when I pasted it into notepad, I saw that it gives the syntax as: /dsQueryResponse/Rows/Row/@Project_x003a_Dept So, I update the 2nd [Project] row in the custom List View WP to use the "_x003a_Dept". I assume that that is the tranlation for a colon (:) With that, I can move the Project:Dept row wherever I want it, and make the form pretty again. However, when the form renders in SharePoint, it literally shows: <a onclick="OpenPopUpPage('http://afms/sites/COP/SharePoint/TeamSiteExample/_layouts/listform.aspx?PageType=4&ListId={26BCD874-91A2-49B8-B441-03C8E30D4D5F}&ID=1&RootFolder=*', RefreshPage); return false;" originalhref="http://afms/sites/COP/SharePoint/TeamSiteExample/_layouts/listform.aspx?PageType=4&ListId={26BCD874-91A2-49B8-B441-03C8E30D4D5F}&ID=1&RootFolder=*">Project 1</a> instead of dynamically rendering the data. I don't know why this or how to correct it... yet. Let me know if you know how to cure. Steve Clark, MCTS | Twin-Soft.com & Easy Bins Dumpster Rentals of Northern VA. (Specializing in driveway-sized roll-off dumpsters.)
July 5th, 2012 11:45am

http://paulgalvinsoldblog.wordpress.com/2007/09/11/will-the-real-xpath-step-forward/ I don't understand his point, but I'm digging.Steve Clark, MCTS | Twin-Soft.com & Easy Bins Dumpster Rentals of Northern VA. (Specializing in driveway-sized roll-off dumpsters.)
Free Windows Admin Tool Kit Click here and download it now
July 5th, 2012 11:57am

Hi SClark, Good, you got some solution after your great efforts. I would like to make couple of points: 1. @Project_x003a_Dept : This is the internal name of the column. So its better not to play with it. 2. You are getting html rendering. To solve this you can use "disable output escaping" parameter in your code code like this: <xsl:value-of select="@ColumName" disable-output-escaping="yes"></xsl:value-of> Let me know if you still face issues. Ashish Mishra|MCTS,MCPD in SharePoint 2010| Twitter:https://twitter.com/#!/707Mishra| Blog: http://www.sharepointblog.co.uk/author/ashishmishra/
July 5th, 2012 12:14pm

FOUND IT!! http://sharepoint.stackexchange.com/questions/13201/inserting-lookup-columns-into-data-view-web-part-displays-as-xml After the field is added, right click and choose: Format As > LabelSteve Clark, MCTS | Twin-Soft.com & Easy Bins Dumpster Rentals of Northern VA. (Specializing in driveway-sized roll-off dumpsters.)
Free Windows Admin Tool Kit Click here and download it now
July 5th, 2012 12:43pm

1. If you don't refer to the internal field name, then you can't display it, right? So, I'm not really 'playing' with it, just tell SPD to display it. (Also, it's what SPD inserts for you if you use the Data Source Details pane options. 2. I verified that that works too. Thats a great tip. (I'm reposting it here, because my antiquated IE 7.0 Browser can't render the code window in your post. It's a gov't thang.) <value-of disable-output-escaping="yes" select="@{ColumnName}_x003a_{AdditionalColumnName}" /> Steve Clark, MCTS | Twin-Soft.com & Easy Bins Dumpster Rentals of Northern VA. (Specializing in driveway-sized roll-off dumpsters.)
July 5th, 2012 2:31pm

I just found the solution to this (I think). It has to the with the order of the columns in the lookup source. Go to the list where you're looking up from and put the columns in the desired order there. Then, remove and re-add the additional columns to your lookup.
Free Windows Admin Tool Kit Click here and download it now
July 5th, 2012 6:06pm

You can use <SharePoint:FormField runat="server" InDesign="true" ID="myField" ControlMode="New" FieldName="myFieldName" /> this should fix the issue.<sharepoint:formfield controlmode="New" fieldname="myFieldName" id="myField" indesign="true" runat="server"></sharepoint:formfield>
August 29th, 2012 3:25am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics