I use this sheet to list data of patients in my hospital. Also in the last tab (Possible_Discharge), I query all the patients that their value of column I is TRUE in the tab (All_Patients) using this query function:
=query(All_Patients!B5:J,"select B,C,D,E,F,G,H where B is not null AND I =TRUE order by B",0)
I also embedded code to clear contents of the sheet whenever I want to fill new data.
The problem I face is every time I fill new data after clearing the contents, The function of query (TRUE) results doesn't work. So, every time I change the TRUE to 'TRUE' or "TRUE" or just TRUE without quotation marks. I wonder what is wrong with this ? Is there a way to rewrite the function?
NOTE:
- Data_Entry tab is where I fill the data of patients.
- All_Patients tab is generated by query function (view only) from Data_Entry tab.
- All_Patients tab Column I represents the column H in Data_Entry tab when the checkbox value is TRUE.