Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

To change field_value

I searched the tags in the community discussions but could not get a clue. I would appreaciate any help on the following:

I have two fields X and Y as below:

     X               Y

VISIT 1
VISIT 3
VISIT 1Yes
VISIT 3Yes

I want to change the Field X value to 1a and 3a (as applicable) if Field Y value = Yes. I know I can use InputField function but it becomes tedious to manually change the large data set.

Many thanks in advance

Darshan

6 Replies
Highlighted
Master
Master

you can do only at script level during load of data .

Highlighted
Contributor III
Contributor III

Thanks Sunil - Agreed.

Can  it be done without changing the source data? If so how?

Darshan

Highlighted
Not applicable

Hope it helps!

Load X,

       Y,

       if(Y='Yes',X&'a') AS NewX

From TableName.xls

Highlighted
Contributor III
Contributor III

if I use the At titude's script it creates another field NewX.

I therefore tried

Load X,
       Y,
       if(Y='Yes',X&'a')as X

and it worked fine

Thanks.

Highlighted
Not applicable

Hey

Yours is incorrect! You cannot give same column name for two or more fields from same table. That's the reason I have named it as NewX for your understanding. So the answer which I have given is correct.

Please let me know if you have any questions.

Thanks,

Attitude

Highlighted
Contributor III
Contributor III

Hi,

In a hurry I typed wrong - sorry about that.

The following syntax wroks for me:

T1:

Load X,

        Y

From abc.xls

T2:

Load Y,

     

         if(Y='Yes', X&'a') as X resident T1;