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 06:56 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2018 07:19 AM
Is the background value of Development the same as the Label?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2018 10:20 AM
Yes, the TEXTs and the VALUEs are the same for all of the choices.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2018 01:08 PM
So, you are sure that there is no chance of case sensitive issues. Are you?
If yes, just test the code by inserting Alerts in between. This helps in finding the cause of the issue.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2018 06:10 AM
The green box is not correct. It should be:
var DBSV = ((g_form.getValue('sizeforcomputation')-0)/1024); //the "- 0" is to force is to a numeric value