Need to multiply 2 fields on portal

Sri56
Tera Contributor

Hi Team,

 

we have two fields :

number of request (single line text) and capacity (single line text).

we need to multiply these and set in capacity only once.

trying the below code

but this is running on a loop.

 

 

please help me with the code.
var res = parseInt(g_form.getValue('number_of_requests')) * parseInt(newValue);
        alert(res);
        g_form.setValue('capacity', res);

So when number of request given 40 and capacity given 3 when user take off the cursor it should multiply and set as 120.

the above code should not trigger again (whereas not in a loop)

Please help!

Sri56_0-1699855719929.png

 

Thanks!

Sri

10 REPLIES 10

Hi Anand,

 

Please find the updated code:

Sri56_0-1699860920287.png

still getting a error on portal with wrong entry.

Please help!

 

Thanks,

Sri