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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Need to pass parameters from URL to fields in Custom List

Posted By:      Posted Date: August 26, 2010    Points: 0   Category :SharePoint

I have a complex customized list and I need to pass parameters of two fields so that when the 'Questionnaire' is completed and subsequentially opened after initial submission, it will retrieve the Number and GUID automatically in respective fields. I send an email out with a link to the 'Form' that carries the parameters. I am trying to use the following javaScript but am unsure as to where to place this on the SharePoint page for it to work.



<script type="text/javascript">

function loadFormVars()
getQuerystring('CustodianGUID', 'ctl00_m_g_d08916d8_7224_4665_be72_2de381f45985_ff46_1'); ///replace
customerGUID and form field name
'ctl00_m_g_d08916d8_7224_4665_be72_2de381f45985_FormField11_ctl00_ctl00_TextField'); ///replace customerGUID
and form field name

alert("it works");

function getQuerystring(key, field)
key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regex = new RegExp("[\\?&]"+key+"=([^&#]*)");
var qs = regex.exec(window.location.href);
document.getElementById(field).value = qs[1];


View Complete Post

More Related Resource Links

Importing SharePoint List Data into Project Server 2007 Custom Fields

Learn how to use the programmability features of Project Server 2007 and Windows SharePoint Services 3.0 to import SharePoint list data into an enterprise custom field.

can a Workflow access a stored procedure and pass the parameters from the list data to the stored pr

The reason that I would like to consider this functionailty is because my table architecture is complicated and I do not want to modify my master table to accept all of this data where some of the data should be normalized into sub tables.  Has anyone see evidence of the stored-procedure parm approach?  Is this best accomplished through VS 2010 or can I do it through SPD? Thanks

Move custom list (with lookup fields) to another Web Application

Is it possible to move a custom list with lookup fields to other custom lists from one web application to another? Creating list templates does not work and breaks the relationship. Thanks.   Neil

How to pass multiple filter parameters to moss report viewer from custom filter provider


I have written a custom filter provider webpart which implements ITransformableFilterValues to pass parameter value to moss report viewer webpart.

However, this interface only allows to pass one parameter. Please can someone guide me through correct resource which allows my custom filter provider webpart to pass multiple parameters to report viewer. E.g if my report has 5 parameters then my filter provider webpart should allow me to make connection with report viewer and pass all 5 parameters.

How to pass custom parameters to BCS .NET connector?



I've been developing a BCS .NET connector for connecting sharepoint search to custom web service. I'm now facing a problem that I must somehow pass the URL to the web service as a configurable setting (as opposed to setting hard-coded into the connector .NET code itself) to connector's .NET code. What would be the easiest way to do this?

I found out that the external system link created for my connector in sharepoint central administration opens a view that says:
"There are no configurable properties."
Is it possible to somehow add a setting to be configured here?

Note that I've also found out that adding appSettings-section into C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebServices\Root\web.config can be used to pass parameters to the connector, but this doesn't seem to work when the connector is used by search crawler (mssdmn.exe).

So, what is the recommended way to pass custom parameters to BCS .NET connectors?

How to populate 2 custom list fields from one selection in a 'people or groups' selection


Hello everyone, I'm new to the forums.

I need to create a custom list that has the fields:

  • Name (get by People or groups - searched via e-directory)
  • Job Title
  • Picture

Now I want Job title to be auotimatically filled in depending on what name the user selected from the first option.  The actual date in e-directory already has the person's job title, so it seems resonable to me that when the user chooses the person they want to add, the person's job title automatically fills in a field.  However, I can't seem to be able to do that.  I created the Name field then when I went into the Show Field drop down, it had several options including telephone number, surname, job title.  I then selecvted which I wanted to show.  Is there a way to create another field that the user doesn't see that then is populated with the the job title, info which is otained from whatever name was selected?

Phew, sounds complicated, I know!

Also, In the picture field, I selected the field type as url/image, then selected show link as image.  But what I would prefer would be the option for the user to be able to browse the site, or their computer for the image file.  Currently, the user has to know the url for where the image is stored in a document library.

Any suggestions would be grateful

List view and hyperlink pass parameters Help




Anyone know how to resolve the below? I am trying to add a hyperlink to the below listview. This hyperlink passes multiple parameters to the next page? I am trying to achieve the below, works with a gridview but not below.






                        <tr >
                            <td style="text-align: center">
                                <asp:CheckBox ID="chkSelect" runat="server" AutoPostBack="true" />

                             <asp:HyperLinkField DataNavigateUrlFields="searchid"

Populate fields from custom list..... Using Sharepoint Designer only



I have a custom list with all Active Directory user data in it......

(AD name / Email / Address / tel .... etc)


I then have a form that user can select their AD name, i want to populate the fields "Phone" + "Email"   etc....

from the custom list....


How do i do it ? using sharepoint designer only ??


Thanks Rob

How to set the order of custom fields in custom list definition of Multiple Content Types


Hi all,

First of all I am sorry for my poor english.

I have a custom list definition and I have mentioned two content types in the "Schema.xml" file of this list. I need to change the order of fields in NewForm.aspx and EditForm.aspx.

For e.g. I have two content types ContentType1 and ContentType2. ContentType2 is inheriting ContentType1.

Fields of ContentType1 are

1. Field1

2. Field2


and Fields of ContentType2 are

1. Field3

2 Field4


When these fields display on new form the order of fields is

1. Field1

2. Field2

3. Field3

4. Field4


But I need to change the order of field by

1. Field1

2. Field3

3. Field2

4. Field4


Can anyone help me to change the display order of fields in new and edit form?


Thanks & Regards,



Custom Form Fields not appearing in Workflow Tasks column list when try to Update List Item


UPDATE:  This problem seems to be solved by closing and reopening the Workflow xoml wizard.


I have created a 3 step workflow and at each step I have a Collect data from user task that I use to Update my list item.  I actually have 4 options (If Else clauses) per step and for each option I have to collect the same data from a different user.  So I'm aiming at using "Update list item" 12 times in this workflow.

I have been developing this workflow over some days but the Custom Form Fields that I create in the "Collect data from user" task are not always available when I try to "Update list item".  By which I mean, I try to specify the "data source and field to perfom the lookup on" and I can select the "Workflow Tasks" list but the field that I just created in the "Collect data from user" task does not appear in the fields list!!!

I can't determine why a field doesn't appear.  I have tried using no spaces or special characters, keeping the name of the field short but for some reason my newly created field doesn't appear in the list.  The field does appear in the content type when I look at the settings for the "Workflow Tasks" list and the field appears in the "Workflow Tasks" list of columns and the site content type.&n

custom list template columns not in order (not keeping required fields)

I have a template (based on a custom content type) that I got working just the way I want it. All the list forms are in the order I want with the fields showing that I want.  I saved this list as a template and create List#2 from that template, but its forms don't show all the required fields (they don't show on the form), and some items are out of order.  Can anyone explain this to me please?  I am working towards a site definition that needs everything just so.
There are no mistakes; every result tells you something of value about what your are trying to accomplish.

How to Create views with Standard Custom List Fields


Hi Guys !

I have a requirement to create views with the following fields along with the fields created by us.

How to create this view ? Do we need to use SPD or VS or can we do it in the SharePoint using browser directly?

   Content Type ID   

   Has Copy Destinations

   Copy Source


   UI Version

   Select (web part connection)

   Instance ID


   Effective Permissions Mask

   Unique Id

   Client Id

   Edit Menu Table Start

   Edit Menu Table End

   Property Bag

   Level etc...



Thanks & Regards




Custom fields rendering on list views


I have a custom field on my sharepoint items which contains a multicolumnvalue. The field definition includes a RenderPattern which works in sp2007 to render the values as a link (it parses the name and url out of the MCV and then shows them as a link). This isn't working in sp2010 though - the list view just shows the entire contents of the MCV as one long string.

I've had a look at the FLDTYPES.xml and the format still looks unchanged, so I would expect my custom field definition to still work. Is that correct or has something changed? I did read something that sounds like it may apply to me here http://stsadm.blogspot.com/2008/12/custom-field-types-and-wss-40s-xslt.html, but I'm not sure what to do with this information and whether I'm on the right track at all.

Could someone help and explain this to me? Sorry for being dense!

How to merge two columns data into a third column (text fields) in a custom list? is it possible to



I am wokring with MOSS 2007 environment.

In one of the sites I have a custom list which has the following columns

1. Report Title - Hyperlink

2. Description - Multiple lines

3. Created date - date


The requirement is to merge the "Report Title and Description" and show it in a third column which will be inlcuded in the custom view.

Report Title                           Decsription                                                                Created date

XYZ                           Test Report which needs to be deployed                 01/01/2011


This needs

custom field type works in view properties, but not in list view: 3 parent fields filter child list,


My situation:

A) odd thing is that no matter where I put a stop point in my custom field type, it is NEVER hit when the items are displayed in list view.  Event with <Field Name="CAMLRendering">TRUE</Field> which causes the list to error out, but again no stop point to help me know why.

B) the value of the column in question will be different for every user who views the list, I'm querying a secondary list based on the user's loginName, and two of the fields from the list we're in. 

C) the display is customized based on whether any records were returned and the current DateTime, so possible displays would be "", "! 12/1/2010", and "7/7/2011"

D) and the text displayed links over to a form for them to do their assignment. the link url would be a config setting url + "?[one of the fields form the list we're in]"

My questions:

1) Is it possible for fieldtype code to execute while a list view is being rendered?

2) If not, then should I chase down the path of a content query webpart?  Will it be able to filter on the current users login name?

3) If not on 1 or 2, can you think of any other way to do this beyond creating a custom application page? (need to having filtering and sorting on this page)

Cutting Edge: Custom Data Control Fields


In ASP. NET 2. 0, the GridView and DetailsView controls are designed to work together. They don't merely provide complementary services, they also share a number of helper classes and components. The output of the GridView control consists of a sequence of rows, each with a fixed number of columns.

Dino Esposito

MSDN Magazine January 2006

How to pass parameters to MDX through URL?


I have an SSRS report. I created it using BIDS and it uses a Sql Server Analysis Service data source.  The data source query is an MDX query with one parameter: @region, a default value has been set for this parameter.  The value which @region takes looks like [USA].[Northeast].[New Hampshire].[Coos County].

The MDX query goes like this:

Select ....


WHERE StrToMember(@region)

This report runs properly inside BIDS or through web browser after deployment.  In my report manager at http://localhost/Reports, I am able to view this report by selecting the value for the @region parameter from a dropdownlist, which contains such values as

Coos County
Cheshire County
Sullivan County
Strafford County
... ...

I know that we can pass query parameters to SSRS through the URL. I have successfully done so with relational database which uses regular SQL. But, I have not succeeded in passing this @region parameter of my MDX query through the URL.

I tried the following:


It didn'

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