Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Highlighted
warfollowmy_ver
Contributor III

Script. Bug. Delete a non-existing field from the table.

Hello!

I'm trying to remove a field that does not exist from the table, but the script does not report an error. Why?

Labels (4)
1 Solution

Accepted Solutions
Support
Support

Re: Script. Bug. Delete a non-existing field from the table.

I believe Rob is on the right track on this one, as I see the same behavior in 12.30 SR1 release, and I have checked defect system as well as Help, and there is nothing definitive stating that it will throw an error in this case.  I can see the error being thrown when the field does not exist as Rob mentioned, as that is definitely an error, but in your sample, the field does exist, you are just asking that it be dropped from a table to which it does not belong, which to be honest I would expect should likely throw a Field not found message, but I get nothing when running things.  If you have not submitted this to Support via a case, I would recommend doing so, in order that we officially open up a bug investigation with R&D to confirm proper behavior on this.  

Thanks for the thoughts on this Rob, I am pretty sure you are likely dead on with your theory here, but it is odd behavior for sure.

Ok, I followed up with Jeff Koch, one of our OEM guys and asked him about things, and he agreed completely with Rob's explanation, things are working as expected here, as the Field and Table exist, and you do not want the field in the table, which it is not, so the script does not throw an error, as the condition you requested is met.  Given this, I would not submit the case at this point, as I would fully expect R&D to say the same thing here, but hopefully this additional information will make you feel a little more comfortable about the rationale.  I did not get fully until Jeff walked me through things as well, but it makes sense now that this is how we would really want it to behave.  The key factor is the result of your request is correct, the field is not in the table you specified, so that is why it does not error in this case, whereas if you specify something that does not exist, it does error.  

Regards,
Brett

To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.

View solution in original post

4 Replies
MVP & Luminary
MVP & Luminary

Re: Script. Bug. Delete a non-existing field from the table.

I think it's working as designed. You could read 

Drop Field X From Table Y

as 

Drop Field X From Table Y if X exists in Table Y

As long both X and Y are valid identifiers, there is no error.

On the other hand, 

Drop Field Z from Table Y

throws an error if Z is not an existing field or Y is not an existing table. 

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

warfollowmy_ver
Contributor III

Re: Script. Bug. Delete a non-existing field from the table.

That is, in both cases there is no deleted field in the table, but in one case an error is generated, but not in the other.
I think this is a program error.
Support
Support

Re: Script. Bug. Delete a non-existing field from the table.

I believe Rob is on the right track on this one, as I see the same behavior in 12.30 SR1 release, and I have checked defect system as well as Help, and there is nothing definitive stating that it will throw an error in this case.  I can see the error being thrown when the field does not exist as Rob mentioned, as that is definitely an error, but in your sample, the field does exist, you are just asking that it be dropped from a table to which it does not belong, which to be honest I would expect should likely throw a Field not found message, but I get nothing when running things.  If you have not submitted this to Support via a case, I would recommend doing so, in order that we officially open up a bug investigation with R&D to confirm proper behavior on this.  

Thanks for the thoughts on this Rob, I am pretty sure you are likely dead on with your theory here, but it is odd behavior for sure.

Ok, I followed up with Jeff Koch, one of our OEM guys and asked him about things, and he agreed completely with Rob's explanation, things are working as expected here, as the Field and Table exist, and you do not want the field in the table, which it is not, so the script does not throw an error, as the condition you requested is met.  Given this, I would not submit the case at this point, as I would fully expect R&D to say the same thing here, but hopefully this additional information will make you feel a little more comfortable about the rationale.  I did not get fully until Jeff walked me through things as well, but it makes sense now that this is how we would really want it to behave.  The key factor is the result of your request is correct, the field is not in the table you specified, so that is why it does not error in this case, whereas if you specify something that does not exist, it does error.  

Regards,
Brett

To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.

View solution in original post

warfollowmy_ver
Contributor III

Re: Script. Bug. Delete a non-existing field from the table.

You know better. I think that this is strange at least and illogical ...