Referencing other fields in xml

Topics: Developer Forum
Feb 12, 2007 at 12:12 PM

Anyone know how to reference another field in the code. For example I want to make a control that takes one field value and multiplies with another field value to present the result.

There are two needs to get this working:
1) How to write this in the xml file defining the work item that uses the control
2) How to access this information in the code to be able to read the values in thoses two field.

Grateful to any help!

Feb 26, 2007 at 8:42 PM
Hi Tomas,
You can go over Fields collection of the source workitem and look for other fields. I was thinking of specifying in xml the info like below

<Control Type="MathControl" Foruma="{0}*{1}" Field1="System.Priority" Field2="System.Severity">

The control can replace the placeholders like {0} with values of corresponding fields.
Sep 12, 2007 at 8:54 AM

I had successfully created a composite custom control which contains 3 text boxes and one dropdownlist. The problem I am facing is while saving and displaying.

Earlier all these are individual controls in the workItem.

Exactly speaking what are the changes that are required in the Xml and in the Source code of the custom control (IWorkItemControl.InvalidateDatasource, IWorkItemControl.FlushToDatasource)

I was really stuck up with the development. Any help will be greatful for me.