.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

Set value of field in NewItem form through hyperlink

Posted By:      Posted Date: September 17, 2010    Points: 0   Category :SharePoint
Here is my scenario. We're using SharePoint for project management, so I have a List of tasks that needs to be performed and another list containing elements for when people have worked on the tasks. That is, whenever a person has spent some hours on a task he must add an element to the second list specifying when he did the work, who did the work, how long he worked on it and which task he worked on. In a scenario where there are alot of tasks on the Tasklist it becomes very tedious to find the task in a dropdown menu on the NewItem form of the second list. Therefore I would like to add a column to the TaskList containing a link for each task so that when you click Task1's link you will be directed to the NewItem form of the second list with the Task field in the NewItem form set to Task1. My original idea was to use the url of the NewItem form to specify the value of one of it's fields such as: http://server/sites/site/list/NewItem.aspx?TaskField=Task1 If that makes any sense. But I haven't been able to find any way to do this. Does anyone have any idea of how I can make a link in the TaskList to redirect me to the NewItem form of the second list with a field value set based upon which link is clicked? /Michael

View Complete Post

More Related Resource Links

While Printing an Infopath Form it Prints lot of Blank Spaces Before RichText Field


I had an infopath form with few rich text field. When i copy some content from somewhere and paste in the richtext Box then while Printing the form I get Lot of Blank Spaces Infront of the rich text box.

I tried creating teh print view too but still i get bunch of empty pages printed before by richtext box control.

Is there a way we can remove those blank spaces.....

I am not able to find out what is going wrong here....

How to read a column of a sharepoint list to a text string field of infopath form?

My infopath form used to read these email addresses from a web service and web.config file. Now i would like to get these user email addresses from a contact list in a sharepoint server. I am trying to do this without writing any codes. Here is what i have done so far: 1. Adding a new "data connection to receive data from SharePoint library or List" where i selected Email Address column of the contact list. 2. I added a new Text Field and define a new rule with "Query using a data connection" defined above. When i try to access the newly created Text field above it always return empty as if the Query attached to it did not executed at all. What did i do wrong? Is there a better way? Thank you in advance for your help.

Gridview hyperlink field

Hi I have a gridview that has two fields. Both fields are databound...but the one field is a hyperlink field which works fine...but I would like to add a Request.QueryString value to the the value retrieved from the database when setting the navigateurl property. Help would be much appreciated

HyperLink Field Value: RowCommand

Hello. I am accessing the ID field in my GridView RowCommand event (this works fine)... Dim f_iIndex As Integer = Convert.ToInt32(e.CommandArgument)Dim f_oSelectedRow As GridViewRow = grdImplementation.Rows(f_iIndex) Dim f_oAppIdCell As TableCell = f_oSelectedRow.Cells(0)Dim f_iAppId As Integer = CInt(f_oAppIdCell.Text.Trim)  However, when I try to access a HyperLink field the same way, I get nothing... <asp:HyperLinkField HeaderText="Name" DataTextField="Name"  DataNavigateUrlFields="AppId" DataNavigateUrlFormatString="View.aspx?AID={0}"  />  Dim f_oMerchCell As TableCell = f_oSelectedRow.Cells(2)Dim f_sMerch As String = f_oMerchCell.Text.Trim  Thanks in advance!

conditionally hide a field in a custom form using SharePoint Designer

I'm able to hide a field based on a security group. but, how do you hide a field based on a value in another field? Custom form opens, if fieldTwo = "taco", hide fieldOne.    

using a database field as a hyperlink query?

I have three tables in my sql database contactssurvey answersrespondent_initialContacts holds all customer data with custid. survey answers has assigned everyone how took the survey a number in a field called respondent_no.respondent_initial holds input from a webform where I populated it with the custid from contacts and respondent_no from survey answers before the webform input is inserted. I want to send an email to them that had there respondent_no in a hyperlink to the webform so that when they entered their data into the webform it would use the repondent_no to determine where to insert the form data.Example joe clicks http://www.myplace.com/order.aspx?23             Mike clicks http://www.myplace.com/order.aspx?125it would look up respondent_no (23) from the respondent_initial table and insert the data in that row in the database for joe's webform entry and it would look up respondent_no (125) from the respondent_initial table and insert the data in that row in the database for mike's webform entry.my code behind looks like this// Create command                comm = new SqlCommand("INSERT INTO respondent_inital (Practice_Name, Address1, Address2, City, State, Zipcode, Phone, Email, Contact, Dealer, item_9223, item_9129, item

Calculated column and hyperlink field type

Hi I have customer who is asking me if this is possible to provide filter based on the HyperLink field, where he could easly limit results to only those items where link field is filled. As filtering on hyperlink column type is not supported I was thinking to buld some calculated field based on it to return YES (if link is provided) or NO (if link is not provided). The problem is that hyperlink field type is not avialiable on the list of field to be used on calculated field. is there some workaround for that ? thanks for help   Mariusz Gorzoch Blog : http://mariusz.gorzoch.pl Twitter : http://twitter.com/MariuszGorzoch Facebook: http://www.facebook.com/mariusz.gorzoch

Binding list to form not working with '&' character in list field data

Hi, I have a SharePoint list with a field called Title. I have a form based on this list with the field bound to the form as a label (for workflow to access). Here is the code for the form field. <asp:Label runat="server" id="ff2{$Pos}" text="{@Title}" __designer:bind="{ddwrt:DataBind('u',concat('ff2',$Pos),'Text','','ID',ddwrt:EscapeDelims(string(@ID)),'@Title')}" /> I have a workflow that runs through a form action button which take ff2 (title) and  does other stuff. The problem I have is with records where the value of 'title' contains the '&' character (example ab&cd). Blank is pulled in by the workflow when I get the value of ff2. I am guessing it has to do with the data binding and/or escape (special) characters coming through but I don't know how to fix it. Any help will be greatly appreciated

Map an InfoPath form field to a SharePoint column

I am trying to create a custom SharePoint list template feature (feature.xml, schema.xml, the whole nine yards), which is based on the OOTB XML Form Library in MOSS 2007. I copied the XmlFormLibrary feature out of the FEATURES folder on my SharePoint server, and made a few minor modifications (changed the feature name, new GUID, added some fields in schema.xml, created a new content type for it, etc...).

What I ultimately want to do is publish an InfoPath form template into it as the document template for the library, and I would like to be able to map certain fields in the form template to fields in my custom SharePoint library template. In InfoPath, I open the Publishing Wizard and go through the typical steps to publish to a Document Library. I then choose the columns in my form that I want to promote to fields in the form library, and select the appopriate fields to map to in the form library. I publish the form, and do not get any errors or warnings.

However, when I choose "New" from the form library and fill out the form and save it, only certain fields in the library are actually being populated from the form. Specifically, this seems to work fine for a date/time field I am using, but does not work for the "Location" field. I am using the OOTB "Location" field from the "Core Contact and Calendar Columns" group. Ev

Is there any way to populate an InfoPath form field with the data from the site content type column?


I have a Form library with a form template.

The templat has a field "Office name" which should not be a fixed list of values, but a dynamical list, feeded from a different type of form. I'm a novice with InfoPath - Sharepoint and I want to find out, how can I can give users a possibility to create and maintain a list of offices and also have this list as a selection list inside main library form - ALL inside one library, if possible.

I assumed that if I publish main form (Itinerary) as a library template form and lookup form (OfficeInfo) as a SiteContent, I should be able somehow to connect to siteContent column and it's information. But I cannot see how - Site Content Gallery is not appering as a Connection item.

Can I use SiteConenct for this purpose or there are other ways to create end-user lookup lists?

Thank you!


Most basic question - launch form from a hyperlink?

I created my infopath 2003 form and linked it to a forms library on MOSS. But I can't see any way to launch the form except exposing the library and having the users click the New menu item. I'd sure prefer just to have a hyperlink on a page. Is there some way to do this? The form only sends an email, it does not need to populate the library. Thanks.

How should an SQL statement refer to a Text field value on a Windows Form Application?


In a WindowsFormApplication, I have a form that contains an MS Office Spreadsheet (an Office Web component).  The data source of the spreadsheet is  an Oracle table which is referenced in an SQL statement  - for example, the following works fine: 


I've now added a Text field (TextBox1) to the form and would like to have the SQL statement refer to the value of this field.  I've tried various syntaxes, including the following::


This generates an error (ORA00904: "HOST: invalid identifier)

I've also tried the following: 


This generates an error (ORA00904: "FORM1"."TEXTBOX1"."VALUE": invalid identifier)

I'd appreciate any ideas on what the correct syntax should be in referring to the Text field or whether or not this is even possible.


Get the field of form into list


Hi I want to modify the list column according to info path field.

I get the field name in column list and it is sure that that column is specifically used in info path form, But when i changed the value in list it is not showing the exact value in the list.


Please help as early as possible.

SharePoint field type "hyperlink or picture"



I am making a workflow which creates a task for a user.
When the task is created I want to insert an URL into a custom column in the task list of the field type "hyperlink or picture".
I have managed this through the following code in my createTask activity:

        private void CreateMyTask(object sender, EventArgs e)
              myTaskProperties.ExtendedProperties.Add("CustomLink", "http://mycustomsitelink.com/somelink");

The only problem is, I can't figure out how to set the display text for this link. It will show the entire link on the screen, and I would like it to show something like "My link" while clicking it would lead you to the URL.

How to map the new field added to the new form to the list?


I have replaced sharepoint form field tag with input type text field. it does not store in the list. how it can be stored to the list

Thanks in advance

filling current user name in people picker field when loading form using javascript


Hello guys,

I am looking is there any way to fill the current user's name in people picker field in newform.aspx using javascript?

If you anything, please let me know 


Resize a Sharepoint Field on the Custom list form


Hi All Gurus...

I'm just looking for a way to resize the form field input boxes for a custom list form. I don't think I'm understanding how the displaysize attribute works. It doesn't take "px" or maybe I'm looking at the wrong thing. I know this is a easy question

Pls help its urgent


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