Correction to the title... Can't distinguish between "42" and "IM"
I have a For Loop that iterates through text files and brings them in. Recently, our vendor started getting tricky with the formats and sometimes they use an old style, sometimes a new style. The data is imported into an Evaluation table and we skim off the top row (Select top 1 State.....). That result is passed to an expression. The connectors use a Precedence Constraint (Expression and Constraint, Success, @[User::IndexFormatFlag] != "00") to determine which connection manager to use. If the result is "42" it uses the old format, if it is "00" it's the new format (since "42" != "00")
Recently we started receiving a 3rd format. The structure is completely different; however, I can successfully import it into the eval table and strip of the top. Since the new format has a header row, It gets picked up in the query (Select Top 1 State) has the value "Im". I created a new Precedence Constraint to evaluate it and it works. The constraints for the 3 versions are as follows:
@[User::IndexFormatFlag] == "42" (Old)
@[User::IndexFormatFlag] == "00" (New)
@[User::IndexFormatFlag] == "Im" (Newest)
The problem now is that when the folder with the text files has the newest ("Im") and the oldest ("42"), the precedent constraint seems to be getting confused with the 42 vs. the IM and it tries to load the Old format into the Newest format and then subsequently dies. The data is getting streamed to both at once in fact.
Any ideas as to why this might be happening? I'm thinking about creating a second constraint just for the newest format. That way it has to meet both conditions to continue.