Discussion Board for collaboration on QlikView Scripting.
Is it possible to get the field names from the source Table but not the data. forexample by using FileBaseName() , i get name of the File only.
When i load the above table in Qlikview ,i should get one column containing the Name of the Field (i.e. ID and Name) but no data.
i only need field names. Is it possible????????
Use the function NoOfFields(tablename) to get number of fields from your table.
Then use a loop For next on each field and get the name with the function fieldName(FieldNo,tablename).
Create dynamicly into the loop a table containing fields names.
Hi guys thanks For replies..... but i want that when i load the table into Qlikview then i should get a column that will give me name of all Fields in that table .......
________ as FieldNames
I do not want any fields with data
Do like this:
FOR fieldNo = 1 to NoOfFields('tablename')
let _fieldName = fieldName($(fieldNo), 'tablename');
'$(_fieldName)' as FIELD_NAME
Before this script, you need to load the table, and then drop it if you don't want data.