Customize query problem | Jon (LabKey DevOps) | 2015-05-05 23:09 |
Status: Closed | ||
Hi Anny, Thanks for confirming the information. So it is possible to do this via the query. So this is what I did as an example: 1. Create a list that has a boolean field. I kept mine simple with the fields "Name" (which was text/string field) and "Check" (which is my boolean field). 2. Insert some data and have some of the data set to where the boolean box is checked on for True or blank for false. 3. View your data to confirm that it has both true and false values. 4. Click on Admin > Developer Links > Schema Browser to access the Schema Browser 5. Expand the Lists schema and find your list. 6. Create a new query off of that list. 7. Revise your query to use a CASE WHEN function to identify if something is true or false and use a checkmark. See my code example below: SELECT ListTest.Name, CASE WHEN ListTest.Check = false THEN ' ' ELSE '√' END AS Checked FROM ListTest 8. Execute the query to make sure it looks good and then Save & Finish when done. The query above says that if the value is false, display a blank space, otherwise display a checkmark. Regards Jon |
||