This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Series of calculated fields in Item Type Properties Values

Notus - Wednesday, December 19, 2012 7:24 PM:

So I would like to populate a series of item type properties based on values from other properites.

Example:

Item Type Property Value 1 = X

Item Type Property Value 2 = Y

Item Type Property Value 3 = (X + Y)  * .1

 

I'm looking at using a method at the onchange event on the form level.    Basically I need to a calculated item type property field that changes as the values are updated.  I have no problem doing this  at database level (via stored procedure) or writing a vbjavascript method.    I just need some to explain best direction/practice.

 



Brian - Thursday, December 20, 2012 12:58 AM:

Hi Notus,

I think it depends where/when you want to see the impact of the change.

If you want to see it immediately (ie. when the user selects one of the input properties) then you will need to do it as a client side method on the form (as you have already indicated).

Since all client side methods must be Javascript there is your answer.

If you want it to calculate and just save to the database then you can do it in an onBeforeAdd/Update server method on the Item Type itself.

Hope this helps,

Brian.