Submitted by mdiluglio on Fri, 03/11/2016 - 11:54am
Hi, I'm not sure if this is where it belongs, but I am trying to make the results of a tlist query the current selection so I can work with those students. I'm looking and still will but if anyone know... I would appreciate it. Thank you, Mark
Corey Hilliard
Mon, 03/05/2018 - 11:14am
Permalink
Use TList results to make 'Current Selection'
I added a link to the body of the document:
<a class="button" id="currentSelection">Make Selection</a>
Then added the following script to create the selection.
- <script>
- $j(document).on('click','#currentSelection',function(){
- loadingDialog();
- var all = "ids=";
- var ids = [~[tlist_sql;select id from students where rownum <= 10;]~(1),[/tlist_sql]0];
- all += ids.join('&ids=') + '&selectionAction=replace&temp=false';
- $j.post( "/admin/SaveSelectedStudentsToSelection.action", all.replace(/ids=&/gi, ''), function() { closeLoading(); });
- });
- </script>
Just change your tlist_sql to select the student' s id needed for your query.
I also notice that this post is 2 years old. But, if any one else stumbles on it, maybe this help help point them in the direction needed.