- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-15-2020 01:04 AM
Hi All,
I have a variable of reference field type with simple condition in it.
I need to sort the results by a column in descending order.
I used variable attributes section where ref_ac_order_by=columnname.
This is doing ascending order sorting.
How to do it descending order sorting by a column name?
I have referred many community links and also got to know , have to write query business rule. But I am not happy with that.
Kindly advise using variable attributes sorting by descending or a better way.
Thanks,
Ram Prakash K R
Solved! Go to Solution.
 
					
				
		
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2020 04:39 AM
Can you try like this
var encodedquery = "sys_created_on>=2020-12-14^sys_created_on<=2020-12-15 23:59:59";Thanks,
Narsing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-15-2020 11:24 PM
Hi Narsing,
Can you please check my code and let me know what I am doing wrong here, if its working for you?
Thanks,
Ram Prakash K R
 
					
				
		
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2020 03:39 AM
Hi,
gs.dataGenerate will not support in Client side. So try in this way.
var encodedquery = "sys_created_on>=2020-12-14^sys_updated_on<=2020-12-15";Also, Give the Client Script "Order" (Ex: 20000) as highest number so that it will make sure to run this script at last after all the variables loaded.
Thanks,
Narsing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2020 04:01 AM
Hi Narsing,
After changing the script as mentioned above,
I am not seeing all the resultant records. Some records are not shown.
Thanks,
Ram Prakash K R
 
					
				
		
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2020 04:39 AM
Can you try like this
var encodedquery = "sys_created_on>=2020-12-14^sys_created_on<=2020-12-15 23:59:59";Thanks,
Narsing
 
					
				
		
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2020 04:50 PM
Hi,
Have you tried with the above query? Let me know if it is working for you.
Thanks,
Narsing
