Deleting a calculated field from a view not possible (used in report) - but this is wrong
Completed
Hi,
I have two calculated fields in a view that I cannot delete. YF claims they are still used in a report. But this is definitely wrong, both fields are not used (anymore).
I checked it with the following SQL, the result is clear. There is no report that still uses this field and YF is wrong.
How can I delete the two fields from the view? I have not found a knowledge article on this.
SELECT a.reportId, c.reportname, c.reportstatuscode FROM ReportField a INNER JOIN ReportFieldTemplate b ON (a.fieldtemplateid = b.fieldtemplateid) INNER JOIN ReportHeader c ON (c.reportId = a.reportId) WHERE b.shortdescription = 'calculated field name'; RESULT 102209 REPORT_NAME DELETED
Hi Stefan,
Thanks for reaching out to Yellowfin Support.
Before any backend modifications to the Yellowfin database are done, it would be good to confirm whether it is being used in a report or not. To do this the FieldTemplateID of the Freehand SQL Calculated Field must be obtained, this can be accomplished by running the following query:
SELECT FieldTemplateId FROM ReportFieldTemplate WHERE ShortDescription = '<insert column name here>'Then once in possession of the FieldTemplateId it is possible to find out which report(s) Yellowfin thinks is using the unused Freehand SQL Calculated Field by running the following query:
SELECT ReportId FROM ReportField WHERE FieldTemplateId = <insert FieldTemplateId here>
Then having confirmed that the Freehand SQL Calculated Field is not being used, it may be removed from the view by running the following query:DELETE FROM ReportFieldTemplate WHERE FieldTemplateId = <insert FieldTemplateId here>
and just to be tidy also run the following 2 queries (they mightn't be required). The ViewId is also available from the ReportFieldTemplate table:and this one:
Hopefully after performing these steps you will have been able to remove your unwanted column, please let me know how it goes.
Also, because you are playing around in the backend of your Yellowfin repository, please make sure to back it up immediately beforehand!
Regards,
Sri Vamsi
Hi Stefan,
Thanks for reaching out to Yellowfin Support.
Before any backend modifications to the Yellowfin database are done, it would be good to confirm whether it is being used in a report or not. To do this the FieldTemplateID of the Freehand SQL Calculated Field must be obtained, this can be accomplished by running the following query:
SELECT FieldTemplateId FROM ReportFieldTemplate WHERE ShortDescription = '<insert column name here>'Then once in possession of the FieldTemplateId it is possible to find out which report(s) Yellowfin thinks is using the unused Freehand SQL Calculated Field by running the following query:
SELECT ReportId FROM ReportField WHERE FieldTemplateId = <insert FieldTemplateId here>
Then having confirmed that the Freehand SQL Calculated Field is not being used, it may be removed from the view by running the following query:DELETE FROM ReportFieldTemplate WHERE FieldTemplateId = <insert FieldTemplateId here>
and just to be tidy also run the following 2 queries (they mightn't be required). The ViewId is also available from the ReportFieldTemplate table:and this one:
Hopefully after performing these steps you will have been able to remove your unwanted column, please let me know how it goes.
Also, because you are playing around in the backend of your Yellowfin repository, please make sure to back it up immediately beforehand!
Regards,
Sri Vamsi
Hi Stefan,
Thanks for your reply.
I have raised a jira task to the development team. I'll provide an update here as soon as I receive an update from them.
Regards,
Sri Vamsi
Hi Stefan,
Thanks for your reply.
I have raised a jira task to the development team. I'll provide an update here as soon as I receive an update from them.
Regards,
Sri Vamsi
Hi Stefan,
I have reviewed your problem and I would like you to try the following steps below :
If you see that the calculated fields are still being used in a report, but you are certain that they are not, it's possible that the references to those fields exist in unpublished or hidden reports. You could try the following steps to see if that's the case:
If you still cannot delete the calculated fields from the view, even after following the steps above, you could try creating a copy of the view, and then deleting the calculated fields from the copy.
Regards,
Sri Vamsi
Hi Stefan,
I have reviewed your problem and I would like you to try the following steps below :
If you see that the calculated fields are still being used in a report, but you are certain that they are not, it's possible that the references to those fields exist in unpublished or hidden reports. You could try the following steps to see if that's the case:
If you still cannot delete the calculated fields from the view, even after following the steps above, you could try creating a copy of the view, and then deleting the calculated fields from the copy.
Regards,
Sri Vamsi
Hi Stefan,
Hope things are good on your end. Just wanted to check in to make sure you had what you needed here.
Regards,
Sri Vamsi
Hi Stefan,
Hope things are good on your end. Just wanted to check in to make sure you had what you needed here.
Regards,
Sri Vamsi
Hi Stefan,
Greetings for the Day!
Just want to let you know that due to unavailability of Vamsi who is no longer working at Yellowfin, I'm stepping in on behalf of him since I was looking out a few outstanding tickets. I understand you brought up this issue months ago and you did not hear back from us. However, I wanted to make sure that things will go into the right directions.
Test Performed
We added a few calculated fields to a view, published it, then used those fields to build a report. We then attempted to remove the fields from the view, as expected we got an error that selected fields are being used by reports and cannot be deleted.
Then we removed those fields from a report and tried to delete those Feilds from a view and we were able to delete them.
As product team is proactively working on this case, we would like to know few more details as a part of investigation.
1. Could you please share the exact message which you see while deleting a calculated field from a view.
2. Please verify if the field is used in report/view filters.
3. If possible, screen recording would be helpful here to replicate it locally.
Regards
Nishant
Hi Stefan,
Greetings for the Day!
Just want to let you know that due to unavailability of Vamsi who is no longer working at Yellowfin, I'm stepping in on behalf of him since I was looking out a few outstanding tickets. I understand you brought up this issue months ago and you did not hear back from us. However, I wanted to make sure that things will go into the right directions.
Test Performed
We added a few calculated fields to a view, published it, then used those fields to build a report. We then attempted to remove the fields from the view, as expected we got an error that selected fields are being used by reports and cannot be deleted.
Then we removed those fields from a report and tried to delete those Feilds from a view and we were able to delete them.
As product team is proactively working on this case, we would like to know few more details as a part of investigation.
1. Could you please share the exact message which you see while deleting a calculated field from a view.
2. Please verify if the field is used in report/view filters.
3. If possible, screen recording would be helpful here to replicate it locally.
Regards
Nishant
Hello Stefan,
I hope all is well,
We have few updates by the product team, since we were unable to replicate this issue. We would need below information to proceed further.
Regards
Nishant
Hello Stefan,
I hope all is well,
We have few updates by the product team, since we were unable to replicate this issue. We would need below information to proceed further.
Regards
Nishant
Hello Stefan,
I hope all is well,
It is unfortunate that we were unable to reproduce the issue in our environments, but glad that at least you were able to find a workaround. We will continue to work on improving errors at DB level and that we will be here in case they need help again in the future.
Regards
Nishant
Hello Stefan,
I hope all is well,
It is unfortunate that we were unable to reproduce the issue in our environments, but glad that at least you were able to find a workaround. We will continue to work on improving errors at DB level and that we will be here in case they need help again in the future.
Regards
Nishant
Replies have been locked on this page!