Need to multiply 2 fields on portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2023 10:08 PM
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
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!
Thanks!
Sri

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2023 10:22 PM
Hi Sri,
I assume the script is onChange(). Would it be possible to share entire script and configuration once.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2023 10:25 PM
Hi Jaspal,
Yes, it is on change,
please find the attached screenshot:
please help!
Thanks,
Sri

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2023 10:50 PM
You can comment out line 6,11 and 12.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2023 11:38 PM
Hi Jaspal,
Even after commenting, its keep on multiplying.
please help!
Thanks,
Sri