Script - how to set a constant value for a var script? also some equation questions too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2018 04:15 AM
Hi,
I'm not entirely sure where to look on why this script is not working. I have very limited knowledge on scripting, but will get some education very soon, yet I have a deadline coming up for this. Hope someone can help.
RED BOX: I'm trying to set a constant value for each VAR I created. Is this done correctly? or it needs some other scripting?
GREEN BOX: The value which will be input manually in a single text field, will always be divided by 1024, so I'm trying to come up with a VAR for it. Can I script it like this?
BLUE BOX: here, I placed the "equation" in the script, so the output will be in the 'price' variable.
Maybe I'm doing the entire script too simple, and apparently wrong.
Please help.
Thanks!
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2018 04:21 AM
HI,
YOu have used setvalue and getvalue, Please use getValue and setValue and give it a try.
Thanks,
Ashutosh
Please mark answer as correct or helpful
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2018 04:57 AM
Hi, Ashutosh.
Thanks, but it still does not work.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2018 05:01 AM
Hi,
For getValue you have to take that value in one variable first then divide it.
g_form.getvalue('sizeforcomputation'/1024) should be either
1) var a = g_form.getValue('sizeforcomputation')/1024; OR
2) var a = g_form.getValue('sizeforcomputation');
var b = a/1024;
THanks,
Ashutosh Munot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2018 05:09 AM