on ‎2016 Mar 15 7:24 PM
Hi People,
Below snapshot is my Csv file and I want to get X value for TID (BPC Property) if TID length is 3 in csv file?and rest should be as Empty?
So in this case 504, 505 value should be update as X in BPC for TID Property and others FZ,ZK, A etc should be as Empty.
Could you please let me know how i can do this?
Csv File:
Transformation file.
Thanks,
Vishu
Request clarification before answering.
Hi Vishu,
You can use conversion file for TID with JavaScript like:
* js:%external%.toString().length==3 ? "X" : ""
Vadim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vadim,
Hope you are well!
I have used Javascript in Conversion file.
Converted TID data to X if TID value length is 3 and rest of records are rejected.
See below snapshot
Even i tried to add two lines instead of using JavaScript. This solution also converting to X if TID value length is three and rest it is loading as it is.
Output data
Could you please correct me if i am missing anything. thanks!
Vishu
Yes, you are right! Just checked....
It's not possible to generate empty value in the property using conversion file!
You can generate empty property in transformation file, but you can't check string length in transformation - only direct string comparison...
May be instead of empty property you can use "N" like:
| * | js:%external%.toString().length==3 ? "X" : "N" |
Vadim
Or without JavaScript - 2 lines:
??? X
*
Vadim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 30 | |
| 6 | |
| 4 | |
| 4 | |
| 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.