Forum Discussion
_anomDiebolt_
8 years agoQrew Elite
You can do it with script - click on the +/- to expand/collapse the sub-query
Subdatasheet
https://haversineconsulting.quickbase.com/db/bmnf7nrvf?a=td
Subdatasheet
https://haversineconsulting.quickbase.com/db/bmnf7nrvf?a=td
- SuryaExpert7 years agoQrew Assistant CaptainDan, Where is the code to show the embedded report field on clicking the +/- icon? Can you put us under the hood there, please?
- _anomDiebolt_7 years agoQrew EliteIt looks like I did not post the Pastie link. Here it is:
Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=564 - SuryaExpert7 years agoQrew Assistant CaptainDan, This works like a charm. Thank you so much!
- SuryaExpert7 years agoQrew Assistant CaptainDan, The +/- functionality works fine until you use the dynamic filters. What am I missing? Once you use a DF to filter out some data, this special field does not respond at all. You have to remove all dynamic filters that have been applied and refresh the screen. Only then it works again. I tried to replace the "on" event with the click event and still the same effect. Any idea what may be causing this?
- _anomDiebolt_7 years agoQrew EliteI think I created the initial demo before dynamic filters were released. I am sure it is simple to modify the script. If you need this functionality feel free to contact me off-world using the information in my profile:
https://getsatisfaction.com/people/dandiebolt - _anomDiebolt_7 years agoQrew EliteOkay I briefly looked at this. When you invoke a filter QuickBase is making an AJAX call to QBI_TableDashboardUpdate however the pages does not reload:
https://haversineconsulting.quickbase.com/db/bmnf7nrvf
?a=QBI_TableDashboardUpdate
&charset=windows-1252
Since the page does not reload the module.js file does not execute a second time - it only executes once when the page initially loads. You can get your code to react to filter changes by detecting hash changes (changes to the fragment identifier in the address bar):$(window).on("hashchange", function(event) { //rerun script });
Another way to detect a filter change is to create a mutation observer.
I would have no hesitation implementing this myself but this type of functionality comes close to impinging on native behavior. You might want to read this timely post and heed MC Hammer's advice "U Can't Touch $(this)":
https://community.quickbase.com/quickbase/topics/u-cant-touch-this - SuryaExpert7 years agoQrew Assistant CaptainWhen you click on the dynamic filter, the hashchange event is getting fired, no doubt. But I can't rerun the script for the +/- in that event because that's not when I want it to run. AFTER the hashchange event has occurred, when the user clicks on the +/- button, that's when I want the script to run. But once the hashchange event has occurred even if I click on the +/- nothing happens.
- SuryaExpert7 years agoQrew Assistant CaptainIs the hashchange event disabling other events from occurring?
- _anomDiebolt_7 years agoQrew EliteWhen the dynamic filter is invoked the HTML elements associated with the report are regenerated. This regeneration effectively removes the click handlers associated with the +/- expando that the module.js script inects. Thus the click handler associated with the +/- expando has to be added after the dynamic filter regenerates the report and detecting the hashchange event is probably an adequate way to detect that the report has been regenerated.
Getting this particular demo to work with dynamic filters comes close to interacting with native capabilities and might cause problems in the future if and when QuickBase modifies the code behind their dynamic filters implementation.
I am not going to update my demo but I am sure it is straightforward to accomplish. If you want to pursue a solution fee free to contact me off-world using the information in my profile:
https://getsatisfaction.com/people/dandiebolt