- In my underlying Excel_file, the last column that is currently populated is AG (or 33) (that is like a counter, the total of operating hrs as it was in January - the data of February will be available in the first days of March)
<=> Then, one column will be added next to AG (so the new one will be 34)
... and so on every month from now
=> so the last column to be added in the first days of December will be 43 (the December data will be in next year's list)
=> I have a loop running from a counter of 34 to 43, parsing the columns for a keyword to identify whether or not it is a data_field and - if it is, it is loaded with an alias_name following a specified naming_format
- if it is not (example), it is loaded with the value 'dummy_35' and the alias_name 'dummy_35'.
=> All of those fields are included in the LOAD
- Then I have another loop running from a counter of 10 to 20 (on the table just loaded because what used to be column 34 is now column 10, but still called like 'dummy_34')
=> If one of those fields starts with 'dummy', a DROP FIELD statement is constructed in a variable using the Fieldname() function on that table (always adding 24 to the counter to get the correct field_name)
The strange thing is: That loop runs without issues up to the counter of 15 (or 39) - the last fields, although the syntax is exactly the same (those fields are all created in the first loop) are ignored: The IF_function is just skipped as I can see in the Debugger and the commands within that IF_THEN_loop are not executed.
Can anyone tell me what might be the difference that I cannot see there?
This sounds like it could be solved with a cross table load with a wildcard LOAD * to accommodate a varying number of fields. I am not sure from your explanation exactly what it would look like, so I will wait until you can provide that sample if you need more help.
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
That is just what I was not sure of - I wouldn't like to award myself points for getting through some issue, that's why I never marked such threads as solved up to now. But if the system is clever enough to not give me points in that case, I will do so. Thank you!
Hmm ... should I now do as you say or award you the points for telling me ;-)