- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-10-2018 01:37 PM
Hi,
I am trying to use substring() function to extract a part of the variable value and pass it on the target record but it is not working. Actually, I want to remove the '$' sign from the value and take the rest of the string. I am able to pull the whole value but not a substring. Have tested by logging results in gs.log.
Can anyone please help?
Any help will be highly appreciated.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2018 07:56 AM
Just go with:
var capexSwCost = (producer.Software_CapEx_Cost.toString()).replace("$", "");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2018 11:53 AM
What do you get if you include this at the top of your script:
gs.log("value from producer variable = " + producer.Software_CapEx_Cost.toString());