Umair,
You can make data tables show up conditionally (and anything else available in an incident tab) by creating a section.
In the layout editor click into the tab you'd like the data to show up in and drag and drop a 'Section' from the 'Blocks' group on the right hand side of the screen into it. Drag your data table(s) into their own separate section(s). Click the wrench on the selection and you can then set a condition for when that section should appear.
Since you want the data table to show up based on a function running I would create a field that would serve as a flag to whether or not the function ran. In the post-process script of the function I would set that flag to the True value, which should trigger the section and the corresponding data table to show up.
Let me know if you have any questions, I'd be happy to help out!
------------------------------
Liam Mahoney
------------------------------