3 Replies Latest reply: Jun 6, 2016 11:00 AM by Sunny Talwar RSS

    Load Field Name As Value

    Joel Ferringer

      Greetings Qlik Community!

       

      I have a series of .xml files that store the actual key value as the field name.

       

      I need to load all files, assigning the FieldName as the value stored inside a new field.

       

      It's my understanding that you can't use the FieldName function on a data ingestion. It has to be already preloaded into memory, in order to specify the table name.

       

      Using CrossTable requires inserting the field name to assign as the new field, and that field name is different in every xml file.

       

      The files are structured like the following:

       

      File1:

      Field 1,               Field 2,          Key_ABC123

      Red,                    Apple,               0

       

      File2;

      Field 1,               Field 2,          Key_DEF456

      Yellow,               Banana,              0

       

       

       

      I need to combine these files (with a Load *, because there are way too many to load and concatenate them manually), and assign the Key Field Name as the actual value stored inside of a new key field.

       

      Like this:

      Field 1,          Field 2,               Key

      Red,              Apple,               ABC123

      Yellow,          Banana,             DEF456

       

       

      Perhaps with a loop?

       

      Any suggestions greatly appreciated.

      Thanks!