none
Column Ordring of Additional Lookup Fields RRS feed

  • Question

  • 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

    Monday, June 25, 2012 9:40 AM

All replies

  • 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

    Monday, June 25, 2012 12:47 PM
  • 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

    Monday, June 25, 2012 6:45 PM
  • 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/

    Tuesday, June 26, 2012 11:11 AM
  • The best I can see is to alter the view and change the order there.

    Steve Clark, MCTS | Twin-Soft.com

    Tuesday, June 26, 2012 1:33 PM
  • 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



    Sunday, July 1, 2012 1:35 AM
  • 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


    Sunday, July 1, 2012 1:47 AM
  • 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

    Tuesday, July 3, 2012 5:48 PM
  • I am talking about the out-of-box dispform.aspx.  You don't have to do anything special to it.  

    - Jeff Barton

    Tuesday, July 3, 2012 7:27 PM
  • 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.)

    Thursday, July 5, 2012 2:00 PM
  • 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.)


    • Edited by SClark_EasyBins Thursday, July 5, 2012 3:18 PM Made it more pretty
    Thursday, July 5, 2012 3:16 PM
  • 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.)

    Thursday, July 5, 2012 3:28 PM
  • 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/

    Thursday, July 5, 2012 3:45 PM
  • 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 > Label


    Steve Clark, MCTS | Twin-Soft.com & Easy Bins Dumpster Rentals of Northern VA. (Specializing in driveway-sized roll-off dumpsters.)

    Thursday, July 5, 2012 4:14 PM
  • 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.)

    Thursday, July 5, 2012 6:02 PM
  • 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.
    Thursday, July 5, 2012 9:36 PM
  • 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>
    Wednesday, August 29, 2012 7:07 AM
  • I am having this same issue (additional fields that were added with lookup column appear at the bottom on dispform.aspx) and hoping you were able to find a solution. 

    Were you able to hide this (hopefully without the need to create a custom form)?

    Kim

    Friday, October 30, 2015 9:02 PM
  • Hello,

    Did you find a solution for this problem?

    I'm having same issue.

    Note that I dont use Infopath nor Designer.

    thanks

    Wednesday, March 16, 2016 5:27 PM
  • Not an ideal solution, But it works
    Wednesday, June 27, 2018 5:23 PM