Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ConfiForms TableView
formNamef

(ID of d)d.id

d

Average using TableViewMerger

...


Total: 

ConfiForms ValueView
fieldNameTotal:([total])
formNamef


Average: 

ConfiForms ValueView
fieldNameAverage

...

:([entry.d]/[total])
formNamef


Standard deviation

HTML
<div<span id="confiReport"></div>span>


<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=52625840&f=f&q=';
	  var xhr = AJS.$.ajax({
  		url: url,
  		timeout: 10000, // 10 sec
  		success: function (data) {
            var total = 0;
            var rows = data.list.entry;
			for (i=0;i<rows.length;i++) {
				total = total + rows[i].fields.d;
            }
            AJS.$('#confiReport').append('<p> Set1: ' + total + '</p>');
    		console.log(data);
  		},
  		error: function (jqXHR, textStatus, errorThrown) {
    		console.log('request to get data from ConfiForms has failed... ' + textStatus);
  		}
	});
   }

  });
</script>