[progress Communities] [progress Openedge Abl] Forum Post: Re: What Is The Best Way To Loop...

  • Thread starter Thread starter jsniemi79
  • Start date Start date
Status
Not open for further replies.
J

jsniemi79

Guest
Hi Paul, You could use the selectQuery API to handle this. The key is to use the ORDER BY in DESC order for the date field that you are tracking. Below is some sample code that should point you in the right direction. Just update the field names and the object name to reflect what you are using(all values in red). var activityArr = rbv_api.selectQuery("SELECT field FROM object WHERE typeField = 'Partner - Breakfast' ORDER BY datefield DESC", 1); if (activityArr.length > 0) { var lastDate = new Date(activityArr[0][0]); } return lastDate; If you have any questions, please let me know. Jason

Continue reading...
 
Status
Not open for further replies.
Back
Top