Hi Bala,
You can use the following script code to populate a listbox as required:
var today = APPLICATION.getInfo().dateNowInternalFormat;
var month = Convert.stringToInt(today.substring(4,6));
var year = today.substring(2,4);
var quarter = Math.ceil(month/3); // Calculate quarter based on month
var qArrays = ["Q1","Q1;Q2","Q1;Q2;Q3","Q1;Q2;Q3;Q4"]; // Arrays of quarters per quarter
var quarterArray = qArrays[quarter - 1]; // Get array string of quarters based on current quarter
var quarterList = quarterArray.split(";"); // Convert string of quarters to array
// Loop through quarters to date and add to listbox
quarterList.forEach(function(quarterItem, index) {
LISTBOX_1.addItem(index + 1 + "", quarterItem + " - " + year);
});
Regards,
Mustafa.