Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

dennis_o
New Contributor III

Renaming a field in a table without reloading the table

Is it possible to do this?

It would make sense to say:

Rename field

     X

from

     Y

To

     Z

Unfortunately this from syntax does not seem to exist in this context.

Instead all fields are renamed, which causes problems if you want to rename only the field of one table.

I work with noconcatenated tables, so I work with independand data.

1 Solution

Accepted Solutions
dennis_o
New Contributor III

Re: Renaming a field in a table without reloading the table

I solve this problem now by:

:

     NOCONCATENATE LOAD

          *,

          X AS 'Z'

     FROM

          [STH];

     DROP FIELD

          X

    

     FROM

          Y;

4 Replies
klausskalts
Contributor

Re: Renaming a field in a table without reloading the table

Rename field X to Y;

Should Work ....

dennis_o
New Contributor III

Re: Renaming a field in a table without reloading the table

It does not work, if a different table already has a field Y.

The fieldname was Z btw.

Furthermore it renames fields in other tables that are also called X to Z.

klausskalts
Contributor

Re: Renaming a field in a table without reloading the table

That's correct,

1) you cannot rename a field to a field name which already exists.

2) renaming a field will rename the field globally

But what is it you try to achieve?

One thing you might do is to utilize the ALIAS function. If you load all your Alias' in the beginning of the script then it should rename the fields as you go along.

dennis_o
New Contributor III

Re: Renaming a field in a table without reloading the table

I solve this problem now by:

:

     NOCONCATENATE LOAD

          *,

          X AS 'Z'

     FROM

          [STH];

     DROP FIELD

          X

    

     FROM

          Y;

Community Browser