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: 
derekjones
Creator III
Creator III

Changing field names not always automatically updates qvw objects, expressions etc

Hi All

I'm cleaning up the field names in my application and have discovered that on some updates of names the new name has, to my surprise, automatically replaced the old name in Object Dimensions, expressions and variables i.e. It's not necessary to do a Find and Replace and manually update object Dimensions. However this doesn't occur 100% of the time and in some circumstances it's even replaced the field with a different field? (I think the latter is maybe because I have removed fields in the same load as I rename and maybe it has a sequence?)

I assume there must be some logic or process to this I'm missing? Does anyone have any knowledge on this?

My thanks in advance

Derek

5 Replies
johnw
Champion III
Champion III

I don't know the actual logic, but yes, QlikView tries to guess what you want based on your new data model.  Sometimes it guesses right, sometimes it guesses wrong, and sometimes it decides to not even try.  Yes, I do think it's taking sequence into account when making these guesses.

If you change a single field name and change nothing else at the same time, I've never seen QlikView fail to get the right name into the expressions and such.  So to be as safe as possible, you can make your changes one at a time, slowly and carefully.

derekjones
Creator III
Creator III
Author

Thanks John

That's exactly the approach I have taken in light of not finding a pattern to it's application of field names when you do it on mass.

It does appear (so far) to behave itself when you only update one field at a time.

For anyone looking to do the same, some helpful tips I've learned from doing this...

  • If you are loading from QVD's to a final app, do the name change at the final load script first e.g. 'full_name as EmployeeName'. You can then apply each field name change individually on reload of the QVD. Once all your fieldnames have been updated, you can then go back to your QVD and rename them in that load so you bring in a clean file in your main app.

  • Before updating, I create a MultiBox with all the fields from the table. This gives you an instant view of the table as the names are being updated. If the name changes as you finish the reload, then you know your field has updated. If it goes grey, then you know something is stopping the new load replacing the field i.e. that field also used in another table.

Hope this helps.

Derek

erichshiino
Partner - Master
Partner - Master

Hi, John.

When you make a lot changes, it's difficult to predict what QlikView will do.

Is it possible to disable it? Sometimes I believe it would be less confusing...

Regards,

Erich

Not applicable

Fellow Qliksters

Thanks for the comments so far on this topic.

Being a newbie I'm still a bit unclear on how to even get one field name updated.

Example:

Say I have a script that has the following line as part of a load statement:

Cust As Customer

And that the field "Customer" is used throughout the application in expressions.

Now, suppose I change the above line in the script to say:

Cust As USCustomer

Upon reload, should I now expect QV to have updated all expressions etc. to use "USCustomer" wherever "Customer" was used before? I did a quick try and nothing happened, what am I missing or misunderstanding?

Thanks for your time.

Not applicable

Additional observation:

So far it appears to me that the automatic field update does not work if the field in question is a concatenated field, i.e. I was able to get this field updating to work when going from:

"Cust As Customer"   changed to  "Cust"

(This updated Customer to Cust)

Likewise

"Cust"  changed to "Cust As Customer"

(This updated Cust to Customer)

However, a field that was defined as follows:

"Product & '|' & Order As ProductOrder" did not get updated to USProductOrder when I updated the script to be

"Product & '|' & Order As USProductOrder".

Update:

Just a dumb beginner mistake for the concatenation. The concatenated field in question didn't update since I forgot to make the identical change in the script for other tables that this field was supposed to link to. When I did it correctly the updating works as described above for the fields, concatenated or not, but best to do one at a time as they point out.