IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

How can process two different files having similar structure to source component (mapforce flex tex Options · View
sandeep.udgirkar
Posted: Wednesday, February 5, 2014 6:43:00 AM
Rank: Guest

Joined: 12/13/2005
Posts: 0
Hi,

I have two types of text Files, which is having similar structure.

1) First type of Text Files Containing the following Columns Structure

Number
Name
Date Of Birth
Currency
Division

2) Second type of Text Files, which is having the following Columns Structure.

Number
Name
Date Of Birth
Division

The second Text File is similar structure to first text file except column - Currency.

I created Mapforce flex text for first text file by using MapForce Flex Text Tool. I want to use the same mft for second text file, is it Possible or not, if yes, please assist, How can i restrict that column in mft.
ultrabeet
Posted: Wednesday, February 5, 2014 8:40:47 AM
Rank: Advanced Member

Joined: 8/19/2012
Posts: 149
Location: Ireland
Hi sandeep,

We are not aware of your structure and what you are trying to do with it, so any advise would be just a guess.

The only thing I could suggest at this stage is to check if Division is empty. This would mean, that the data was written into Currency column and you can pull it from there.

On the other hand, I would just copy the existing flex project, alter the mapping in it and drop it into mapforce. This would create a proper structure...

sandeep.udgirkar
Posted: Wednesday, February 5, 2014 10:08:55 AM
Rank: Guest

Joined: 12/13/2005
Posts: 0
Hi Ultrabeet,

Here, I am attaching my two text Files, which are having similar columns
also attaching mft and Mfdf project

issue: - When i processing TestFile2.txt File, the divison column values are displaying in Currency Columns because of Currency - Column is not available in that text file (testfile2).

Expected - if the text file doesn't contain currency column, it should not display any values in that column and display division values in division column

Could You Please assist me



File Attachment(s):
TestForCurrency.zip (3kb) downloaded 1,051 time(s).


ultrabeet
Posted: Wednesday, February 5, 2014 11:38:08 AM
Rank: Advanced Member

Joined: 8/19/2012
Posts: 149
Location: Ireland
sandeep,

This is a very simple logic... Why did you even use flex for tis? Simple cvs input is available in mapforce by default...

If you still want to continue with the current logic, simple IF statement will do the trick here.

As per my previous reply, if division is empty, use the data from currency field.
sandeep.udgirkar
Posted: Wednesday, February 5, 2014 11:53:55 AM
Rank: Guest

Joined: 12/13/2005
Posts: 0
Hi,

Thank You for Reply,

Could U please provide a sample example where should i write if condition in generated code or Mapping window

could u please provide brief explanation
ultrabeet
Posted: Wednesday, February 5, 2014 12:18:36 PM
Rank: Advanced Member

Joined: 8/19/2012
Posts: 149
Location: Ireland
sandeep,

You do not need to do anything in the generated code.

just check the manual
sandeep.udgirkar
Posted: Wednesday, February 5, 2014 12:42:53 PM
Rank: Guest

Joined: 12/13/2005
Posts: 0
hi

Thank You for Reply,

Please find the attached Updated Project

as you told tried in my Project,

but it is not giving correct output

Note - In Text File, Division Column having some values.

File Attachment(s):
TestForCurrency.zip (32kb) downloaded 1,050 time(s).


ultrabeet
Posted: Thursday, February 6, 2014 8:42:20 AM
Rank: Advanced Member

Joined: 8/19/2012
Posts: 149
Location: Ireland
sandeep,

Sorry, but your attempt there does not look logical.

Think about what and why you are replacing...
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.