Hi!
Is it solution to check if a column exists or not and go ahead with the calculation only if the column exists?
By my example I use the Cross Tab Tool and my output columns are variable.
And so it is possible that a column is not always in the output but if exists in the output than make a calculation.
At the moment I get the error message from the Formula Tool.
Formula (..) Unknown variable "<my varialble>"...
Mathias
Solved! Go to Solution.
I am attaching the updated flow here, but have a question for you. Is the file layout consistent except for 'FOO'? There is an easy approach for that. If the field list looks like:
{Foo, Bah, Blubber} or {Bah, Blubber}, then you can create a sample row of data using a text input (like you did already) and UNION it together with your input tool (set your text file as the 1st file in (specific output order configuration). You can then SAMPLE and SKIP the first record. If Foo exists, it will have it's value and if Foo is absent, it will become NULL.
You can then handle the formula based upon IIF(isnull([Foo],0,[Foo})
Just a thought.
You can PM me and we can chat on skype or webex.
Thanks,
Mark
Hi,
I have tested you solution it works great.
I have expanded your solution without Foo column.
The expansion closer than how I will use it in the future!
Mabe your question was responded already.
It would be nice if you can have a look on it!?!
I have a question still to you:
What is the advantage to use the Detour Tools? The result is always the same.
Mathias
User | Count |
---|---|
18 | |
14 | |
13 | |
9 | |
8 |