Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Kalyani22
Contributor II
Contributor II

How add prefix for a field in a table in Qlik sense Script.

I have data like this.

Plant code, Company code.

001, 7002

Now I want to add prefix for this code.

Output:

Plant code, Company code.

ICE/001, ICE/7002

Labels (1)
1 Solution

Accepted Solutions
camilasophia697
Contributor
Contributor

 

To add a prefix to a field in a table in Qlik Sense script, you can use the CONCATENATE function. Here's a short example:

 

LOAD
'ICE/' & [Plant code] AS [Plant code],
'ICE/' & [Company code] AS [Company code]
FROM
YourDataSource;

This script will load the data from your data source and concatenate 'ICE/' with the values of the Plant code and Company code fields, creating the desired output with the prefix added.

 
 
 

 

 

View solution in original post

3 Replies
Clement15
Partner - Creator III
Partner - Creator III

Hello, you can do this in your script:

 

Table:

Load

'ICE/'&[Plant code] as [Plant code],

'ICE/'&[Company code] as [Company code]

From x ;

Nicolae_Alecu
Creator
Creator

Hello, 

You can use this:


set vPrefix = 'ICE\';

Load 
vPrefix&[Plant code] as [Plant code],
vPrefix&[Company code] as [Company code]

camilasophia697
Contributor
Contributor

 

To add a prefix to a field in a table in Qlik Sense script, you can use the CONCATENATE function. Here's a short example:

 

LOAD
'ICE/' & [Plant code] AS [Plant code],
'ICE/' & [Company code] AS [Company code]
FROM
YourDataSource;

This script will load the data from your data source and concatenate 'ICE/' with the values of the Plant code and Company code fields, creating the desired output with the prefix added.