Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
brunopaulo
Partner - Creator II
Partner - Creator II

Field Name variable

Hi Community,

Im doing a For each cycle for load several excel files. Its something like this.

FOR EACH File in FileList ('..\Dados\Matriz de Polivalência *.xls')

Table1:
     Date(field1) as Date,

     Name as Area

From $(File)

...

I want to change the name field depending on the file, but i have no idea how to do.

Can anyone help me?

Thank you
Best Regards,

Bruno Paulo

1 Solution

Accepted Solutions
YoussefBelloum
Champion
Champion

Hi,

Maybe this:

FOR EACH File in FileList ('..\Dados\Matriz de Polivalência *.xls')

Table1:
     Date(field1) as Date,

     if($(File)='the name you want', name,'else...') as Area

From $(File)

...

View solution in original post

5 Replies
YoussefBelloum
Champion
Champion

Hi,

Maybe this:

FOR EACH File in FileList ('..\Dados\Matriz de Polivalência *.xls')

Table1:
     Date(field1) as Date,

     if($(File)='the name you want', name,'else...') as Area

From $(File)

...

brunopaulo
Partner - Creator II
Partner - Creator II
Author

Hi i'm not sure how to play there are 7 files with 7 differente Field Name dat i want.

Can u develop a bit more? Thank You

Best Regards

Bruno Paulo

brunopaulo
Partner - Creator II
Partner - Creator II
Author

how to apply*

YoussefBelloum
Champion
Champion

'I want to change the name field depending on the file' => what are the name fields you want for each name file ?


can you post a mapping table ?

brunopaulo
Partner - Creator II
Partner - Creator II
Author

I dont have Mapping table because im manually defining the name field. But i did better i gave excel name so solved my problem Thank you