Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
johnjustus
Contributor III
Contributor III

Changing Field value in QVW

Hi,

I have a field called "Report Name" in a qvw and this field has few values.

Out of the few values, one value is Test-GC/HD

I wanted to change the value to Test-GC-HD

How can I go about doing this change and I want the field name to stay as is "Report Name"

Appreciate your help!

Thanks

13 Replies
sunny_talwar

May be like this:

LOAD If([Report Name] = 'Test-GC/HD', 'Test-GC-HD', [Report Name]) as [Report Name]

johnjustus
Contributor III
Contributor III
Author

Thanks. I want to do in the document.

Is it possible to edit the existing field that is returned from the script in the document and apply any relevant function?

sunny_talwar

You mean you want to do this on the front end? You sure can.... anywhere you were going to use [Report Name], use the above statement instead

johnjustus
Contributor III
Contributor III
Author

Where exactly I need to apply the statement in the UI?

I brought the field to a list box to see if there is a place in the properties that I can change it but I don't find any.

Can you please advice?

Thanks

sunny_talwar

Instead of using a field for your list box, use expression

Capture.PNG

vishsaggi
Champion III
Champion III

Copy Sunny's expression in your Listbox -> Field dropdown -> scroll to the bottom you can see Expression

then type

= If([Report Name] = 'Test-GC/HD', 'Test-GC-HD', [Report Name])


Capture.PNG

sunny_talwar

What is your field name? Report Name or what?

johnjustus
Contributor III
Contributor III
Author

Thanks Everyone.

In the particular list box the value changes but my original "Report Name" still holds the original values.

I am calling this "Report Name" in many places and even in  Nprinting and I want the values in "Report Name" field to contain the modified values.

Is it not possible in the UI?

Thanks

Anonymous
Not applicable

Hi John,

In that case, Create a Variable with the same name as your field name. Like the one below. Go to,

Settings-->Variable Overview -->Add.

1.JPG

Then Use that variable where ever you want. In the list box, give it as an expression.

2.JPG

Good Luck......