Location:
Date:
Set1
Set2
Set3


Form


All records


Order by date asc


Using REST API to show data PER WEEK

https://wiki.vertuna.com/ajax/confiforms/rest/filter.action?pageId=23265387&f=f&q=&sort=mydate%20ASC
https://wiki.vertuna.com/ajax/confiforms/rest/filter.action?pageId=23265387&f=f&q=&fields=set1,set2,set3,mydate.formatDate(w),mydate&sort=mydate%20ASC
<div id="confiReport"></div>


<script>
  AJS.toInit(function() {
	var isPageEdit = AJS.$('#content').hasClass('page edit');	


    if (!isPageEdit) {
      var url = 'https://wiki.vertuna.com/ajax/confiforms/rest/filter.action?pageId=23265387&f=f&q=&sort=mydate%20ASC';
	  var xhr = AJS.$.ajax({
  		url: url,
  		timeout: 10000, // 10 sec
  		success: function (data) {
            var currentWeek = confimoment().format('W');
            var runningWeek = null;
            var rows = data.list.entry;
			for(i=0;i<rows.length;i++) {
               console.log(rows[i].fields.mydate);
			   console.log(confimoment(new Date(rows[i].fields.mydate)).format('W'));	





            }
    		console.log(data);
  		},
  		error: function (jqXHR, textStatus, errorThrown) {
    		console.log('request to get data from ConfiForms has failed... ' + textStatus);
  		}
	});
   }

  });
</script>