on ‎2015 Jul 24 6:16 PM
Hello,
I am trying to apply conversions to a range of value in a Conversion File. I am using 10.0 NW. I find in the 7.5 documentation that ":" is supported for a range of cells, but I can't find that in the 10.0 NW documentation (which is much more lacking in documentation that 7.5...) Is this not supported in 10.0 NW? If it is supported, any ideas on what I'm doing wrong?
The concept of what I need to do is load in BRL Rates at -1/Value for June 2015 going forward, and for prior time, apply no conversion. This works perfectly if I just hardcode BRL201506, but I don't want to have to hardcode every month going forward for the rest of time...I wasn't to use a range.
| EXTERNAL | INTERNAL | FORMULA |
|---|---|---|
| BRL201506:BRL999999 | BRL | -1/Value |
| BRL* | BRL |
If this isn't possible to do using standard conversion, can someone help me with the js equivalent I would need to accomplish this?
Thank You,
Alex
(Also unrelated, if I try to paste anything into the SCN post editor here, it freezes all the text and I can't make any further changes to my post, thus having to refresh the page and retype my entire post...and since I can't copy it back in, have to retype the entire thing again, any ideas what's going on there?...)
Request clarification before answering.
"(Also unrelated, if I try to paste anything into the SCN post editor here, it freezes all the text and I can't make any further changes to my post, thus having to refresh the page and retype my entire post...and since I can't copy it back in, have to retype the entire thing again, any ideas what's going on there?...)" - I have no issues with Firefox to post on SCN, which browser are you using?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So I tried accomplishing this in js and can't get it to work. Any suggestions?
js:if(%external% >= BRL20150601) { -1/Value } else { Value }
js:if(%external% >= BRL20150601) { -1/Value; } else { Value; }
*IF(%external%>=BRL20150601 then (-1/Value); Value)
*IF(%external%>=BRL20150601 then (-1/Value); )
All of the above result in an "evaluation error" of the statement when I run the Import.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ups...
Search Google for "javascript tutorial"
Test first link: JavaScript Tutorial
Look on: JavaScript Comparison and Logical Operators Conditional (Ternary) Operator
syntax:
variablename = (condition) ? value1:value2
Look on the example and "Try It Yourself"
Test your code in the online testing environment
Vadim
Hi Vadim,
I tried your first post today (the "Try It Yourself" test) and I got the same formula as you
The Import now succeeds (before it failed to "evaluation error") however, it always goes to Value, it doesn't take -1/Value even if the external is greater than BRL20150601.
I tested this and it works properly in the online tester, but looks like it isn't evaluating properly in the conversion file. Any ideas?
!DOCTYPE html>html>body> p>Input Curr+Value and click the button:
input id="external" value="BRL20150631" /> button onclick="myFunction()">Try it p id="demo">script>function myFunction() { var external, answer, myval; myval=-3.10190 external= document.getElementById("external").value; answer= (external.toString()>= "BRL20150601") ? -1/myval:myval; document.getElementById("demo").innerHTML = answer; } /script> /body>/html>
Hello Vadim,
I changed to a hardcoded value, and it looks like the logic works. However, that brings be back then to my original question, if %external% isn't supported in the formula column (which seems odd since I feel like that's the point...), do you/anyone know of another way I can accomplish doing math on a value depending on the external value?
I guess I can do this in an APD, but I'd prefer being able to manage it in a conversion file instead of hardcoding in date values into an APD.
Regards,
Alex
Hi Vadim,
Yeah...that is my fallback if I absolutely have to, I just really didn't want to have to add a ton of lines for every currency we have this issue for, I was hoping a simple js solution would work...
I guess I could suggest supporting %external% on the never-read SAP Ideas page, though that place seems to be a waste of time...
If anyone else knows of another way to accomplish this, please let me know.
Thanks,
Alex
Anyway, I recommend you to have a sandbox BPC with the latest SP for tests like now!
Latest:
| CPMBPC 801: SP 0011 |
HI Alex,
Can you explain the logic you want to implement using JavaScript? The range is from 201506 to 999999? Then read some online JavaScript tutorial. Use substring and compare... Easy job!
Vadim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Vadim,
The range is a date range from 201506 (June of 2015) through the rest of time 999999 (99 month, of year 9999). I could make it a sensical month and year, but a range is a range, so I just filled it in with 9's. since that is similar to what sap does (12-31-9999 is usual end date).
Any suggestions on js tutorials as it would apply to this specific case in BPC? I would have to be using it in the Formula field since I'm applying math to BPC "Value". I'm not sure how to do this in relation to what I have.
Also, do you know if js is the only way to do this? Is ":" no longer supported in 10.0 NW and this was just a 7.5 NW feature?
Thanks,
Alex
| User | Count |
|---|---|
| 32 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.