# 12.02.2007 5:12:28 -08:00
Hello!

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!

/Tomas
# 26.02.2007 13:42:31 -08:00
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.
# 12.09.2007 1:54:57 -07:00
Hello,

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.


Rajesh