Joshua Posted June 1, 2015 Posted June 1, 2015 Hi, I'm querying some results and would like to title the column (first row). I wrote my sql statement as follows but I'm only receiving the results without the column header: ExecuteSQL("SELECT CustID AS ID , SerialLS AS Serial_Number, DateNTime AS Date, Operator AS Name WHERE SerialLS = ?"; " "; ""; Serial_LS) Am I doing something wrong? What I was hoping to get is: ID Serial_Number Date Name 123 J-804-KL 4-22-2014 Joe Doe 654 M-465-NO 2-01-2015 Marry Jane Instead what I get is: 123 J-804-KL 4-22-2014 Joe Doe 654 M-465-NO 2-01-2015 Marry Jane
eos Posted June 1, 2015 Posted June 1, 2015 (edited) Am I doing something wrong? Nope; AFAICT, that feature is not implemented in FQL. But since you're doing this within the calculation engine anyway, try Let ( [ tab = Char(9) ; headerRow = Substitute ( List ( "ID" ; "Serial_Number" ; "Date" ; "Name" ) ; ¶ ; tab ) ; dataRows = ExecuteSQL ( " SELECT CustID, SerialLS, DateNTime, Operator FROM UnspecifiedTable WHERE SerialLS = ? " ; tab ; "" ; Serial_LS ) ] ; List ( headerRow ; dataRows )) Edited June 1, 2015 by eos
Joshua Posted June 1, 2015 Author Posted June 1, 2015 Thank you eos, it works very well. Question, is there an easy way to have the header align with the data rows? I ask because the result that I'm now getting is something like: ID Serial_Number Date Name 123 J-804-KL 4-22-2014 Joe Doe 654 M-465-NO 2-01-2015 Marry Jane
eos Posted June 1, 2015 Posted June 1, 2015 (edited) EDIT: I guess you could try to fiddle with the number of tab stops in the header calculation and/or the FQL argument; but the only reliable way would IMO be to display the result in a field that has appropriate tab stops set. Edited June 1, 2015 by eos
Joshua Posted June 1, 2015 Author Posted June 1, 2015 I'm VERY interested in "tab stops set" do you have any links where I can learn about this feature? Thanks again.
eos Posted June 1, 2015 Posted June 1, 2015 Layout Mode > Inspector > Appearance > Tabs. Apart from that, tab stops are (should be) a feature of any decent word processing application.
Joshua Posted June 1, 2015 Author Posted June 1, 2015 I did not know File Maker had tab stops. How I did not see it under "Appearance" is beyond me. I will look into it further. Thanks again.
Recommended Posts
This topic is 3539 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now