DMXzone App Connect Data Traversal Support Product Page
  Answered 
 Sorting not functioning
 Asked  28 Apr 2017  17:52:26 
  1 
     has   this question  
  28 Apr 2017  17:52:26 Brad Lawryk posted: 
 Went through the tutorial for sorting columns many times. For some reason it will not sort at all the sorting buttons do nothing.I have a feeling it may have to do with the 'name' part of it where you have to enter a name for the sort. Is there anything specifically that needs to be entered there? How does it know which database column to sort by?
Replies
 Replied 28 Apr 2017  18:06:11 
   28 Apr 2017  18:06:11 Teodor Kuduschiev replied: 
  Hi Brad,
unfortunately i cannot tell what's wrong without a link to your page. As for the name - you enter the name of the column you want to sort by.
  unfortunately i cannot tell what's wrong without a link to your page. As for the name - you enter the name of the column you want to sort by.
 Replied 28 Apr 2017  18:10:52 
   28 Apr 2017  18:10:52 Brad Lawryk replied: 
  I can't provide a link because it's an internal secured dashboard. Is there specific code you need to see?
<th>
Employer
<div class="btn-group btn-group-xs btn-sort">
<button type="button" class="btn btn-link" dmx-on:click="data_viewopenjobs.sort(JOEmployerName,asc)"><i class="fa fa-angle-up"></i></button>
<button type="button" class="btn btn-link" dmx-on:click="data_viewopenjobs.sort(JOEmployerName,desc)"><i class="fa fa-angle-down"></i></button>
</div>
</th>
<th>
Job Title
</th>
<th>Location</th>
<th>
Open Date
<div class="btn-group btn-group-xs btn-sort">
<button type="button" class="btn btn-link" dmx-on:click="data_viewopenjobs.sort(JODateRec,asc)"><i class="fa fa-angle-up"></i></button>
<button type="button" class="btn btn-link" dmx-on:click="data_viewopenjobs.sort(JODateRec,desc)"><i class="fa fa-angle-down"></i></button>
</div>
</th>
  <th>
Employer
<div class="btn-group btn-group-xs btn-sort">
<button type="button" class="btn btn-link" dmx-on:click="data_viewopenjobs.sort(JOEmployerName,asc)"><i class="fa fa-angle-up"></i></button>
<button type="button" class="btn btn-link" dmx-on:click="data_viewopenjobs.sort(JOEmployerName,desc)"><i class="fa fa-angle-down"></i></button>
</div>
</th>
<th>
Job Title
</th>
<th>Location</th>
<th>
Open Date
<div class="btn-group btn-group-xs btn-sort">
<button type="button" class="btn btn-link" dmx-on:click="data_viewopenjobs.sort(JODateRec,asc)"><i class="fa fa-angle-up"></i></button>
<button type="button" class="btn btn-link" dmx-on:click="data_viewopenjobs.sort(JODateRec,desc)"><i class="fa fa-angle-down"></i></button>
</div>
</th>
 Replied 28 Apr 2017  20:55:17 
   28 Apr 2017  20:55:17 George Petrov replied: 
  Hi Brad,
When using the App Connect Actions picker and entering options there if you use static strings they all have to be quoted. Only numbers or other variables shouldn't be quoted.
So you calls will be something like:
So on the UI - make sure you quote the entries as those are really expressions and the UI doesn't know when you are pciking variables or using static strings. So you have to be very clear.
Greetings,
George
  When using the App Connect Actions picker and entering options there if you use static strings they all have to be quoted. Only numbers or other variables shouldn't be quoted.
So you calls will be something like:
 dmx-on:click="data_viewopenjobs.sort('JODateRec','asc')"So on the UI - make sure you quote the entries as those are really expressions and the UI doesn't know when you are pciking variables or using static strings. So you have to be very clear.
Greetings,
George
 Replied 28 Apr 2017  21:05:25 
   28 Apr 2017  21:05:25 Brad Lawryk replied: 
  Thanks George, that almost worked.
All buttons only sort ascending though even if set to descending.
  All buttons only sort ascending though even if set to descending.
<div class="btn-group btn-group-xs btn-sort">
							            		<button type="button" class="btn btn-link" dmx-on:click="data_viewopenjobs.sort('JOEmployerName',asc)"><i class="fa fa-angle-up"></i></button>
							            		<button type="button" class="btn btn-link" dmx-on:click="data_viewopenjobs.sort('JOEmployerName',desc)"><i class="fa fa-angle-down"></i></button>
							            	</div>
  Replied 28 Apr 2017  21:20:56 
   28 Apr 2017  21:20:56 George Petrov replied: 
  as I said above you also have to quote the words 'asc' and 'desc' as well ...
-George
  -George
 Replied 28 Apr 2017  21:23:18 
   28 Apr 2017  21:23:18 Brad Lawryk replied: 
  Argh! Sorry I missed the quotes on the sort order part. Been a long day. Thanks.
 
  

