Dynamic field updates

Dynamic field updates

  
Hello,

I have a form that contains two fields: one is an input (integer) field and the other is a read-only field - implemented using an expression widget - that is the result of taking the contents of the input field and performing a simple calculation on it (it's multiplied by another non-display value).

Currently the calculation is performed in the screen preparation so if the value in the input field is changed, the user has to click on a 'Recalculate' button to display the updated calculation.

I was wondering if there was a way to dynamically update the expression widget - say when the input field loses focus - to redisplay the calculated value without the user having to click on the 'Recalculate' button?

Thanks,
Keith.
Dear Keith:

In attach is an OML that does what (from my understanting) you need.

The input Field has, on the extended properties, a onfocusout event that updates the expression.

The way to make the expression updatable is to create a div inside it and make it an unescaped expression. Then you can update the div directly in javascript.

Please let me know if this helps.

Best regards:

Miguel
Hi Miguel,

thanks for the reply.

I can't open the OML - we are using Service Studio v3.1.2.18 but the OML was built using 3.1.3.4 - would you be able to build it using an earlier version and reattach it?

Thanks,
Keith.

Keith:

Here is the OML in version 3.1.2.

Hope it helps.

Miguel
Hi Miguel,

this is exactly what I was looking for. Thanks for your help!

Regards,
Keith.