Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a rather complicated LOAD from an Excel list where each month one column is inserted in a specific place.
To find out whether or not to load certain columns, I have a script working in several steps (I will attach it all in a txt file so that you can reconstruct it)
- First, I have a FIRST1 LOAD so that I know all the fieldnames;
- Then I parse columns 33 (in this instance) to 45 (12 months) and fill two variables for each:
- If the fieldname is such that it is a real field, the first variable holds its fieldname
- In that case, the second one holds an alias (the fieldname a bit shorter)
- If the fieldname does not meet my criteria, both variables are e.g. > dummy_37 <
Once all those variables are filles, I have the actual LOAD with 12 lines (33 to 45) all looking the same (built up in Excel). They work fine in principle but for a detail:
- When I put the field_variable in square brackets (they do have BLANKs), then the script breaks at line 44 (there is no data for Nov and
thus there is no column) and I get a message "Field not found > dummy_44 <"
- When I put the field_variable in quotes instead, I get only the name of the field in every line, not the value.
Can anyone help me solve that issue?
Thanks a lot!
Best regards,
DataNibbler
Perhaps adding lower() and trim() will fix it.
IF LEFT(lower(trim(FieldName($(i), 'Staplergrundkosten'))),5)='dummy' THEN
Hi swuehl,
but for that EXIT FOR which leaves the loop and saves any unnecessary iterations afaIk, I cannot really spot a difference between your code and mine?
Can you explain that to me, please?
P.S.: Oh, I see - with my version, the first field found was nr. 23, but the next one also starts with 'dummy', so the value was overwritten.
Thanks a lot!
P.S.: I haven't been here for a while, there is more potential for VBA in my company than for QlikView - but the issue with the real_name emails being sent seems to still persist?
Best regards,
DataNibbler