07-12-2013 06:24 PM
Hi Everyone
I created an Account form with datagrid in it that dispaly values from a custom table.
Itisfilteredtodisplayonlyrecordsofthataccount (nativeconfiguration)
I would like to filter/display the records only for the current logged in user.
In the query builder under the SQL property, I tried to set the CREATEUSER = :userid like I do in groups but that did not work.
Any ideas on how to filter it?
Thanks
Oren
Solved! Go to Solution.
07-13-2013 08:49 AM
Dim SQL, cUserID, myAccountID
CUserID = Trim(Application.basicfunctions.currentuserid)
myAccountID = Application.BasicFunctions.CurrentAccountID
SQL = "Select ....... From Table A1 WHERE A1.ACCOUNTID = '" & myAccountID & "' AND A1.CREATEUSER = '" & cUserID & "' "
grid.sql.text = SQL
07-16-2013 01:13 PM
07-16-2013 02:09 PM
In the old days you had to
grid.sql.text = sql
grid.refresh
and you still see some of that code around (or even freshly coded!!!). That's two round trip retrievals of the same data.......