Trouble with Conditional Statement with Numeric formula based on V-String column
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello
I'm having trouble with a conditional statement referencing a 'V-String' type column, then using numeric column type 'Double' columns to calculate an Output in data type 'Double'.
The highlighted 'yellow' column is my required output, derived using the impact formulas.
My flawed formula is below and in attached workflow. I thought 'IF' statement with ''ToNumber' would be best way to go but keep getting a 'malformed error' and 3rd formula just doesn't compute.
Could someone please explain best way to use conditional statements based on a V-String type column, then using 'double' type columns to compute a math formula to give numeric (double type) output?
Stuck in the mud with this one sorry.
Thanks!
Sures
Solved! Go to Solution.
- Labels:
- Developer Tools
- Expression
- Help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @sureslala
I seem to have gotten this working, a few notes on what was wrong:
- On the first ElseIf parenthesis were missing
- All of the impact value formulas did not align to the values in the text input. For example the text input has 'External - Internal' and your formula has 'External-Internal'.
- There was no final else clause or endif in the formula (I set this to null but you can make it whatever)
- I don't think the ToNumbers are doing anything, but don't do any harm
- On the text input your Positions had trailing spaces and commas which caused data to be lost following the select tool. For sake of making this work I tweaked that, but if that's how your input is you may need to add some steps to cleanse the data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks Luke looks like I was a little careless in my formulas and didn't pay enough attention to my data. Lesson learnt! thanks again. I've got my test example to work, will now hopefully apply same lessons to my main
