pbakker wrote:Question about loading the result of a custom SQL statement (getdatasetbyquery) into a form: No problem of getting the result into the form as a foundset, but is there a way to display it on listview or a portal?
What I' trying is to get a listview of al the users in the system. The getasHTML doesn't fullfill my needs (I think), because I want the user to be able to select one of the found users and based on the selection trigger methods.
So far I have the following code:
var pkdataset = security.getUsers()
//elements.test.text = '<html>'+users.getAsHTML()+'</html>';
controller.loadRecords(pkdataset)
Any way of doing this? (without building a form based on the repository)
Hi Paul,
Beginning in 2.0b1 you can execute a global method with INLINE HTML. So, if you displayed the list of users as HTML - you can add this line to your HTML - and have a "link" that the users can click on that execute a Servoy global method:
<a href="javascript:methodName">PersonName</a>
You can even pass parameters to the global method:
<a href="javascript:methodName('100','300')">PersonName</a>
IMPORTANT NOTE: If you pass parameters - they MUST be surrounded by SINGLE QUOTES.
Hope this helps,
Bob Cusick