It's all about the answers!

Ask a question

RTC CSV import - Conditional mapping using if-else


harshal Wable (17315) | asked May 04 '15, 8:16 a.m.
I am performing a CSV import in RTC,in which I need to do mapping if certain condition in the source file is met . I am using a mapping file for CSV import . Can we use if-else condition in mapping file.

4 answers



permanent link
Ralph Schoon (63.1k33645) | answered May 04 '15, 8:29 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I am not aware of this capability. The mapping file is an XML file and this does not support conditions as far as I can tell.

Comments
harshal Wable commented May 04 '15, 8:35 a.m. | edited May 04 '15, 8:47 a.m.

Can xslt be used instead of xml?


Ralph Schoon commented May 04 '15, 8:49 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I have never seen the ability to configure an XSLT in the import, so I think no. You can not use an XSLT file, because the mapping is read by the importer in the required format and than the mapping data read is used internally during the import.


permanent link
harshal Wable (17315) | answered May 04 '15, 9:34 a.m.
okay , so it can be achieved in RTC ? Do we need any script if yes ..how and where to execute it ?

Comments
harshal Wable commented May 04 '15, 9:35 a.m.

Okay .So how can we achieve it. Do we need a script to write , if yes .. how and where it needs to be executed


permanent link
Karthik Krishnan (8825117163) | answered May 05 '15, 4:55 a.m.
What you could do:
- create a XSLT with the necessary business conditions
- Transform the existing CSV with this XSLT 
- Create 1-1 Mapping and import



Comments
harshal Wable commented May 05 '15, 7:05 a.m.

Step 1 is fine . I have have a doubt for step 2 and 3 . Shall I give XSLT file as an input in custom data mapping field ? I mean am not not sure where wld XSLT wld be used while imporing ?


Ralph Schoon commented May 05 '15, 7:13 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

As I said above, there is no place to do so in the wizard. You would have to run XSLT manually on your CSV file and create new CSV file(s) with the correct data, that you can then import.


permanent link
Uma venkata Lekkala (52519) | answered May 07 '15, 4:34 p.m.
 Why cannot you condition/process your data as per the business condition using macros prior to importing?

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.