Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys!
Today I have created a Sub to create a standard MasterCalendar. I have all fields and I want to remane only the field Date.
I have try to write
Rename FieldDate to SalesDate;
SalesDate is a field in Sales table.
The rename doesen't work.
I have the same problem in QV10 SR2 build 8935.7.
I have verified that the problem occurs when I try to rename a field that join with other field e.g. MasterCalendar with field Date that I try to rename in SalesDate and a table Sales with field SalesDate.
I think that is a BUG.
Regards
Luca Jonathan Panetta
Hello Luca,
Don't know if you missed in your post but the right syntax is
RENAME FIELD OldName TO NewName;
Are you getting some errors or crashes? Can you post some dummy data so we can check further?
Regards,
BI Consultant
Hi Miguel,
sorry, I misspelled, in the code I wrote correct
RENAME FIELD FieldDate TO SalesDate;
I tried to change the name of the field in TestField and it work.
RENAME FIELD FieldDate TO TestField;
Regards
Luca Jonathan Panetta
Hello Luca,
Can you post some sample code or specify your scenario step by step so we can reproduce it?
I'm trying to replicate it, renaming after joining, and it seems it's working.
EDIT: I see what you say now. I haven't found anything in the Reference Manual, but it makes sense to me because the associative logic and the way QlikView has to associate one table to another. As it is always by means of the name of the field, I wouldn't be surprised I QlikView didn't allow to change any field to a name that is already associating two tables, after the model has been loaded. In the end, you can always change the name in the LOAD part if you want to create relations between tables.
It doesn't allow you to do the opposite either. QlikView doesn't rename a relation field (key field) to any other name. My guess is that if you already wanted to do that, you could have done it in the LOAD process, renaming with "AS" to build/separate tables because of their fieldnames.
And it doesn't work in version 9 either (SR6 Build 7646.9), which in turn adds sense to the above.
Basically, QlikView allows renaming of fields to a new one that doesn't exist in your data model, but it doesn't to an already existing name. Or rather, it doesn't allow you to create links between tables using RENAME FIELD.
Does any of this makes sense to you? Did you try in previous versions with different results?
BI Consultant
Message was edited by: Miguel Angel Baeyens
Hello Miguel,
no I haven't try in previous version, I have see that issue on QV 9 SR7 and laster, QV 10 SR1 SR2 SR3.
Thank's
Luca Jonathan Panetta
I just bumped into this lovely little surprise, too. It's bad enough that the system doesn't let you rename a key field, but what's inexcusable is that the system fails silently! For *bleep*'s sake, the script should throw an error message saying "sorry, you can't rename key fields!"
Hi Jonathan,
I agree, let the support people know through support@qlik.com and create an idea for that. You have my vote!
Regards,
Miguel
Thanks. Unfortunately it's already been mentioned in an idea, and QlikView rejected it, which means we can't vote on it to express it's importance. That's no way to run a popsicle stand.