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

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

how to set a value inside an Infopath form task control ?

Posted By:      Posted Date: September 30, 2010    Points: 0   Category :SharePoint

Hi ,

how can I set a value inside an Infopath form task control ?

i used the following code but it's not working i don't know why

RequestSubmitted_TaskProperties.ExtendedProperties["TxtValue"] = "My Value";

so please advice



View Complete Post

More Related Resource Links

InfoPath Workflow Task Form "Loading" event handler only being called after App Pool recycled.


I have a Workflow that is using an InfoPath task form.  In the "FormEvents_Loading" method event handler I have some code that needs to run each time the form is opened.   I recycle the App Pool and open the form the code runs perfectly, but if I close and try to re-open the form the code is not run at all.  I can then recycle the App Pool again and on the next load the code executes just fine.   The code that is supposed to be run is a very simple statement to set a field value, so I don't think it is interfering.

Does anyone know what this might be?


Infopath form return XMl code during workflow task


1.     Review 7777.xml.

2.     Perform the specific activities required for this task.

Use the Edit this task button to mark the task as completed. (If you cannot update this task, you might not have access to it. Click here to request access.

Workflow doesn't complete when a task is updated directly from an infopath form.

I have an approval workflow that creates a task for a group to approve or reject an InfoPath form. But if a member of the group opens the form and updates the task from there, it doesn't complete the workflow. It only completes the workflow if they go to the actual task and update it from there. Does anyone know how to fix that?

User control or sub-form inside tab-pages? Best practice?

I've got a Windows Forms application with numerous tab-pages within a tab-control. Each tab-page is a diffirent user entry form with different controls of varying types. As the application is fairly large it is important that more than one developer can work on it simultaneously. Thus we decided to create a form for each tab so that different developers could work on different forms at the same time without overwriting each other's code. Each of these "sub-forms" are then assigned its relevant container tab-page as its parent. This works well but I was wondering if this is good practice or not, after another colleague commented that we are making forms look like user controls and that we should rather be creating a user control for each tab. I've converted two of the forms to user controls with relative ease and it does work nicely as well but with one draw back. On the main parent form, e.g. frmMain, where the tab control lives, there is one single button the clear the current display. When you click "Clear display" it clears various others items displayed on the main from, finds the current selected tab and clears its contents. The latter is easy to do with sub forms as I can simply close and dispose the sub form inside the selected tab, and load a new instance. I don't have to write custom logic to go and reset/clear each control on that form. Thi

Using InfoPath Repeating Table in Task Edit form

I need to develop an InfoPath Task Edit form. The form will be used for the approval of the expense reports. I want the users to see the content of the expense report directly on the InfoPath form without clicking on the link and viewing it in a separate window.

I wonder if I can stick the expense report data which is a list into the extended properties of the task and then bind it to InfoPath Repeating Table?



How can I open an InfoPath Form in a modal Windows or Popup from inside another InfoPath Form


Hey guys, I need some help, please. How can I open, in a modal windows or pop up, an InfoPath form from inside another InfoPath form using a button or maybe a link. I need to be able to have both forms on the screen.

How can I do that? Can I use jQuery?

Help, please.

Thanks in advanced!

How Image add to any control of infopath 2007 form.



I have create a BITMAP in my code i want to attach this image to infopath form... please help....

public void FormEvents_Loading(object sender, LoadingEventArgs e){

Bitmap BM = barcode_generator("*ABCD*");


private Bitmap barcode_generator(string data)
            Bitmap barcode = new Bitmap(1, 1);
            Font font = new Font("Free 3 of 9", 60, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
            Graphics graf =  Graphics.FromImage(barcode);
            SizeF datasize = graf.MeasureString(data, font);
            barcode = new Bitmap(barcode, datasize.ToSize());

            //graf = new Graphics.FormImage(barcode);
            graf.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixel;

enable a button control on an InfoPath form based on another button control



is it possible to enable a button control based on another button control. so when a user click on a button it enable another button. only if the first button is clicked the second button can be click aswell


SharePoint Designer workflow task - problem with multiple users selector in InfoPath form




I have got an issue with InfoPath form generated for my SharePoint Designer workflow task. There is a multiple users selector that requests users from a task assignee. The problem is that only the first user entered got saved.


I am using SharePoint 2010 Standard Server (release). Steps to reproduce are the following:

dynamically create a checkbox inside the infopath form?


I have a shared database that drives Windows Mobile Apps, Windows WPF Clients and now rich client InfoPath form (this wont be used an InfoPath web, only the rich office client)...

This database contains a list of daily changing of Audit Questions depending on the week and season etc.

I want to make a call to the database from InfoPath, pull back a list of LabelName and Controltype_id  1=checkbox 2 = textbox

In the Onload Event of the InfoPath form I want to dynamically create Textbox/Checkboxs with the label names from the database, with an question_id per answer.  Then the user will disconnect their internet and drive to the place without service (large metal multiroom coolstores without 3G service)  and fill in the checklist, the the user presses a button, and it evaluates all the answers and makes the background colour grey or black, and change the font colour to white. then the user presses the submit it back to the server when they are back in 3G service again.  

How can this be acheived? can someone send me some example code that works, thanks.

Please dont reply with "this is not possible", make the impossible possible.
1,000s of people told me I couldn't get barcodes into InfoPath even with the cursor on any form field. But I did it.
10,000s of people to

file attachment control on infopath 2010 browser form, validating event not fired


If preview within InfoPath 2010, the validating event is fired. But After deploying the form to SharePoint 2010, the validating event does not fire.

Any ideas?


Blog: http://convergingpoint.blogspot.com/

I want a shown form to stay inside a specified control


That is, say I have an ImageForm and something (Call it ImageHolderForm) that can hold multiple ImageForm windows; I want the ImageForms to stay in the ImageHolderForm window. How do I do that?


Infopath Browser Enabled Form - Filters dont work inside repeating table



I have been trying to create a Browser Enabled form to be used as a Sales Order form, the form will work in the following way.

It will pull in info from a sharepoint list with Customer Codes, it will pull in info from another sharepoint list with customer contact information which will be filtered based on which customer is selected.

There will then be a repeating table to place the order items.  The repeating table has 8 columns, 6 of which are lookups against 1 sharepoint list (all the columns are in the same list).

The sharepoint lsit data looks something similar to this:

Item Type                 Item Provider                    Product Relation              Product Description                Delivery Team              Cost
Service                     Us                &

storing infopath form inside a folder


hello all,

I have a browser enabled infopath 2007 form which i published as template to a form library..in the form library i have several folders and when i am going inside a folder and creating a new form and when submitting it then it is getting stored in the root and not inside the folder...can somebody help me out on this issue..


How can we pass a variable into a InfoPath form control ?


Hi there,

I have created a sharepoint (2007) sequential workflow using visual studio and as a task the user has to fill out an infopath form.

I would like to pass some text into a InfoPath form control. For example once the user open his InfoPath form task, a textbox control should be already fill out with values determined in the workflow code.

How can I achieve this ?For example in my workflow code I tried to set the values of the infopath control with ExtendedProperties. With this following code i can create a infopath task but i cannot fill the textbox control "Comments".


"Comments" is a datasource in my infopath.


  private void createReviewReadyTask_MethodInvoking(object sender, EventArgs e)


   taskReviewReadId = Guid.NewGuid();

   taskReviewReadProperties.TaskType = 0;


Bind Infopath 2010 Form Control to another List Field


Hi, I am having Sharepoint 2010 RTM Enterprise Trial on Windows Server 2008 SP2.

I have Two Lists (List1 and List2) and List2 has a lookup field for List1 ID.

I want to bind some of the controls on infopath form of List1 to List2 fields such that when the user enters the values, these values would be saved in List2 and when the user want to edit the data of List1, the values can be retrieved from List2 on Form Load.

can it be done ?

can it be possible without having a field in List1 (direct binding to List2 field) ?


Uploading a file over 1mb in InfoPath task form causes workflow to error



I have created a custom workflow which requires a file to be uploaded using an InfoPath task form. When i upload a file under 1mb the workflow completes and its status is shown as Completed. However; when a file over 1mb is uploaded, the task completes and the workflows status is shown as In Progress for roughly 1 minute, after which the status changes to Error Occured. The strange thing is the workflow has completed as the document is taken from the InfoPath task form and uploaded to a document library successfuly, as the workflow has been developed to do.

Can anyone tell me how to resolve this issue and what is causing this to happen? The error logs show nothing and i have configured InfoPath forms services to allow documents up to 50mb in size.

Any help would be much appreciated




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