on 2014 Feb 12 8:55 AM
Hi All,
We are currently busy with the upload of transactional data using a Transformation/ conversion file.
Part of the transformation we need to determine value based on the first 2 integer values of a col. If the value is less than 50 we asign one value greater than 50 we asign a diffrent value
unfortunatly you can't use < or > in the transformation (as below)
P_FLOW=*if (*COL(4,1:2) < *STR(1) then *STR(P99);*STR(F_NONE))
I've tried to use a conversion file (JavaScript), but with out any sucess.
* | js:if(%external% < 50) { "P99" } else { "F_NONE" } |
* | js:if(parseInt(%external%) < 50) { "P99" } else { "F_NONE" } |
* | js: if(parseInt(%external%) < 50) then P99; else F_NONE |
(Few more flavours of javascript)
Which is the (best) solution regarding Transformation files and assign single values based on a range values? Can I use Javascript If Stement?
Thanks you for your time
Regards
Jacues
Request clarification before answering.
Hi Jacues/ Vadim
We are facing the same issue. Request you to please share the final script that worked for you
The Requirement is that if the Amount is less than zero then it should insert N_ before the Account and give the value as N_AccountID otherwise it should insert P_ and give the value as P_AccountID
I was trying with the folloing Script
ACCOUNT=*IF(ZZAMNT(1:1) = *Str(less than 0) then *Str(N_)+ /CPMB/FQD03K7 ; *Str(P_)+/CPMB/FQD03K7)
Thanks in advance for your guidance
Regards
Riddhima
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
9 | |
6 | |
4 | |
4 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.