.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Sharon Maxwell
Post New Web Links

Show value from Lookup List inside a view

Posted By:      Posted Date: September 17, 2010    Points: 0   Category :SharePoint
 
I've got a Categories list, a Product list with a Category field defined as lookup value. The Product list is used in an OrderLine List. How can i show the category value from the selected Product in the OrderLine view? I tried calculcated columns, but they don't work on lookup columns. Would this be possible by creating a custom FieldType? (without performance problems, i assume there's a reason why calculated values don't work on lookup columns) Thanks Marco


View Complete Post


More Related Resource Links

XSL Lookup to another List in a View. Joining in data from another List. xsl:value-of select=

  
I've been able to create a DataView with data joined from two SP Lists. I did this using SPD, a linked Source, and doing joined subviews.  The technique works nicely, but I have to create my DataView from scratch.As an alternative, I took an existing AllItems View in SPD, converted it to XSL, and was able to add a column from another List as follows:   <TD Class="{$IDA1VDGH}" style="width: 62px; height: 23px"><xsl:value-of select="/dsQueryResponse/Master/Rows/Row/@Lastname" />The problem is, it reports the column for the first row everytime. I'm new to XSL and was wondering..    using XSL, and preserving all the original columns already in the View, is there anyway to make the added column smarter, maybe with a filter?I noticed in my working example, I have this filter (I guess where the subview join magic is)            [@Title = $dvt_ParentRow/@Key] which does not resolve syntax:I tried this, but it does not work, only finding one match, and it also seems to get set for the entire Dataview and not just the column.     [../../../Master/Rows/Row/@Title = @Key] I guess I'm looking either for the SPD steps, or XSL code for adding a single column from another list, joined in by a column in both lists.Thanks for any help or information.

List View Lookup Threshold Ideal Number

  

MS sets List View Lookup Threshold number for each web applicaiton by default 8. This number specifies the maximum number of Lookup, Person/Group, or workflow status fields that a database query can involve at one time.

In reality, this number is only 6 for custom columns because for each list, there are two default people lookup columns - created by and modified by also considered part of the lookup threshold. What would be ideal number for this threshold - 10, 12, 15, ??? I do understand incrementing this number would have adverse affect but what are the max number where peformance really starts degrading.. Any research or explanation would be really helpful.

Any idea?


# string with cross site lookup field value of List in datasheet view in moss 2007

  
I am getting appended # code value with cross site lookup field value of List in datasheet view, and also i am getting this value while export to Spreadsheet. How to remove this value.....

# string with cross site lookup field value of List in datasheet view in moss 2007

  

I am getting appended # code value with cross site lookup field value of List in datasheet view. I dont want that hash coded value, i need actual value. Please provide me the solution.

 

Thanks

Rajanikanth Rayala


data view web part unable to show data from list in subsite

  

Hello all,

In 2007, I never had any issues with doing this. In 2010, I created a web part that looks at the Pages list and pulls a few columns and as long as I am within the site, it works fine. But I need to call information from the Pages list in a subsite and display that information on the parent site default page.

In 2007, I made this work by changing ListID to ListName and DefaultValue="Pages" and then change the WebURL to DefaultValue="/SubsiteName/" then place it anywhere and it found it. Now if I change the ListID to ListName and default value to Pages I get an error that the web part cannot be imported. if I try using the actual ListID and change the WebURL to the subsite, I get an error that the web part is looking for a list that does not exist. This worked so easily in 2007.

Any one able to tell me what's going on? Or have a solution?


data view web part unable to show data from list in subsite

  

Hello all,

In 2007, I never had any issues with doing this. In 2010, I created a web part that looks at the Pages list and pulls a few columns and as long as I am within the site, it works fine. But I need to call information from the Pages list in a subsite and display that information on the parent site default page.

In 2007, I made this work by changing ListID to ListName and DefaultValue="Pages" and then change the WebURL to DefaultValue="/SubsiteName/" then place it anywhere and it found it. Now if I change the ListID to ListName and default value to Pages I get an error that the web part cannot be imported. if I try using the actual ListID and change the WebURL to the subsite, I get an error that the web part is looking for a list that does not exist. This worked so easily in 2007.

Any one able to tell me what's going on? Or have a solution?


Drop down list inside Detail view

  

I am using a drop down list control inside Detail View but for some reason, its not picking up the selected value from database , secondly not being able to update the values either...Any idea?

<%@ Page Title="" Language="VB" MasterPageFile="~/__admin/_codefiles/Masterpages/admin.master"
    ValidateRequest="false" AutoEventWireup="false" CodeFile="ArticleTypeDetail.aspx.vb"
    Inherits="__admin_Admin_ArticleTypeDetail" %>

<%@ Register TagPrefix="tinymce" Namespace="Moxiecode.TinyMCE.Web" Assembly="Moxiecode.TinyMCE" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadPlaceHolder1" runat="Server">
    <style type="text/css">
        .DataField
        {
            width: 300px;
            height: 50px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div style="padding-left: 22px;">
        <table cellpadding="0" cellspacing="0">
            <tr>
                <td>
                    <div class="admin_blue_box">
                        Select the article type
           

Show custom error message inside SharePoint Business Data List web part?

  
I am using SharePoint 2007 Business Data List web part to show external information retrieved from my simple web service. Is there ability to show custom error message on Business Data List web part?

After using Proc_AddListItem it doesn't show in the GUI List View??

  

I am using SSIS to pull a list from our production database to get a list of names and compare it to a list in sharepoint, then update the sharepoint list with any new names. Right now what I have working is a lookup transformation from our production database to the sharepoint database and an output file destination to put all the new names in.

so it looks something like this in my data flow....

get production data -> convert it so it matches sharepoint data types ->lookup the values in sharepoint and compare them to production ->output any names that don't match to an excel file.

This works great!

here's what I need to do...

Once I get the new names, I need to insert the new names back into the sharepoint list. I have been testing the Proc_addlistitem in Sharepoint to accomplish this and the procedure actually works great and puts the list item in the AllUserData table perfectly! The problem is that Sharepoint doesn't update the actual listitems on the client side. For example, I insert a new item and validate the data, then I go to our local sharepoint site and the listitem DOES NOT appear in the list! What! I can't figure this out.

I can't move on to the next step in my data flow without figuring out why Sharepoint is not showing my data after inserting values.

PLEASE HELP!!

Disable filtering on a Dynamic Data list view.

  

I have an entity set of NotificationTemplates, and each one of these has a collection of zero-many SmsTemplate entities. When editing or viewing a NotificationTemplate, I have a link to View SMS Templates. That link takes me to a List view for the SmsTemplates entity set, filtered for the NotificationTemplate I was viewing.

How can I prevent the user changing this filter to show SmsTemplates for another NotificationTemplate? That is, I want the filter, but it must be read only. The drop-down just mustn't drop down, it must just display the name of the NotificationTemplate that these SmsTemplates belong to. To view SmsTemplates for another NotificationTemplate, the user must click View SMS Templates from that other template.


This was originally asked by myself on SatckOverflow at: http://stackoverflow.com/questions/3514373/disable-filtering-on-a-dynamic-data-list-view



show data in grid view error Arithmetic operation resulted in an overflow.

  

sir

i have a table there is 17 columns in 17 column 3 are number and other are varchar . when i try to display all data of that column error occures.

one more intersting think is when i try to display 6 column then grid show there data an no more error occures. 

when i run my project this error occures in grid view

Arithmetic operation resulted in an overflow. 


Is it possible to show the displaying name instead of value in list?

  

Hi,I just created a custom field type to show all the users of the site.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using System.Web.UI.WebControls;

namespace WSS.CustomContentFields
{
  public class UserFieldControl : BaseFieldControl
  {
    protected DropDownList ddlUsers;
    protected override string DefaultTemplateName
    {
      get
      {
        return "UserFieldWebControl";
      }
    }
    public override object Value
    {
      get
      {
        EnsureChildControls();
        return this.ddlUsers.SelectedValue;
      }
      set
      {
        EnsureChildControls();
        this.ddlUsers.SelectedValue = (string)this.ItemFieldValue;
        
      }
    }
    

    protected override void CreateChildControls()
    {
      if (this.Field == null || this.ControlMode == SPControlMode.Display)
        return;
      base.CreateChildControls();
      this.ddlUsers = (DropDownList)TemplateContainer.FindControl("ddlUsers");
      if (ddlUsers == null)
        throw new Exception("Error: cannot load .ascs file");
      if (!Page.IsPostBack)
      {
        SPSite siteCollection = new SPSite(SPContext.GetContext(System.Web.HttpContext.Current).Site.Url);
        SPWeb site = siteCollection.OpenWeb()

Datasheet view lookup column issue

  

When a column that has a lookup is empty in datasheet view and I attempt to update a different column I get this message: the text entered for isn't an item from the list. select an item from the list, or enter text that matches one of the listed items.

I found this hotfix, but it did not apply.

http://support.microsoft.com/kb/948952

Any ideas how to get this resolved?


label inside table inside div won't show

  
I have a label inside a table cell that is coded to change backcolor conditionally. The table is inside a div tag. The label doesn't appear at runtime. Has anyone experienced this before? Is there a workaround? Thanks. 

VWD 2008 express does not show design view

  
Hi, hope somebody can help me. I was doing a tutorial with VWD and SQL (security Tutorial).I was having a problem making the application to use my own database instead of the default aspnet.db.Don't know what happened, but after reinstalling VWD a few times I had all sorts of problems, VWD would not uninstall etc.so  I used an uninstalling software and must have deleted some files.I know I got a message saying missing ENU\vs_setup.cab. Anyway the problem now is that after I succeded in reinstalling everything I needed, VWD,SQL and Management Studio VWD does not show the design view bur only souce view, Can you help me with htis problwm?Thank you very much.Carlo

Calculated date field displays differently in List View and Data View web parts

  
In SharePoint GUI I created a simple custom list with a calculated Date/Time field (Due).  The calculation is =[Created]+7.  I'm trying to display this data on a page using a DVWP.  But first, for testing purposes, I also created a second calculated Date/Time (TestCreate) field in my custom list that is simply =[Created]. In the List View from within SharePoint, the dates show as expected (for example): Created = 8/12/2010 3:45 PM Due = 8/19/2010 3:45 PM TestCreate = 8/12/2010 3:45 PM In SharePoint Designer, I added a Data View web part and the above three data elements (each configured to display mm/dd/yyyy hh:mm:ss tt).  I see the time displayed for the example list item as: Created = 8/12/2010 3:45:30 PM Due = 8/19/2010 10:45:00 AM TestCreate = 8/12/2010 10:45:00 AM I've tested a couple scenarios and the calculated fields always display five hours in the past (along with dropping the seconds).  It seems like the DVWP is returning the date in a different time zone (with no seconds).  The lcid is set right (1033).  I didn't see any time zone settings for the DVWP specifically.  I'm basically stuck.  Could someone help me figure this one out. Thanks.
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend