Performing mathematical operations
Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators
Performing mathematical operations
I need to alter some values in a CSV table when certain conditions are met. I tried using the character math filter and that just put out strange symbols in front of the number I was trying to change. I was thinking about using JScript to do it but I don't know how to reference the value being read. Anyone with experience on this that can help me out?
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Character maths performs changes to character's ASCII values - it's not what you need.
Use a VBScript inside a restriction to a particular CSV or Tab field to perform the calculations - ensure you set the flags to remove the quotes and delimiters first.
To identify the lines, you could use a restriction to identify the field, and add a special marker like ##FOUND##, then restrict the VBScript above to only operate on lines matching ##FOUND##, and inside this, restricting to a particular delimited field.
Use a VBScript inside a restriction to a particular CSV or Tab field to perform the calculations - ensure you set the flags to remove the quotes and delimiters first.
To identify the lines, you could use a restriction to identify the field, and add a special marker like ##FOUND##, then restrict the VBScript above to only operate on lines matching ##FOUND##, and inside this, restricting to a particular delimited field.