This topic is locked

Excel like functionality with PPRunner user the List page

9/15/2017 9:07:55 PM
PHPRunner General questions
J
justmelat author

Hello
I want to make an aplication that will basically be an excel like sheet, the user will only be able to enter values in the first two top columns [example

A1 A2], these two fields/cells will, based on a calculation of the two populate the remainder of the spreadsheet. Of course the idea is when the user

changes the value in A1 and/or A2 the other values will in a cascade change/update.
The issue is, I want to accomplish the following equation: A3 = (A1 * A2). So when cells A1 is multiplied by A2, the value will appear in cell A3. I found an example for this using the javascript Onload Event in the List section, but could not get it to work, then I realized the references that I was following were for the edit and add pages, not to the list page which is what I am using.
can this be accomplish, if so how?
Any insight would be greatly appreciated. Thank you.

jadachDevClub member 9/16/2017

You can use inline add and inline edit to resemble updating and adding like excel.
I have a project where I need to calculate BMI on the fly. I use this on add page javascript onload. It works in the inline add mode fine.

var ctrlHeight = Runner.getControl(pageid, 'Height');

var ctrlWeight = Runner.getControl(pageid, 'Weight');

var ctrlBMI = Runner.getControl(pageid, 'BMI');
function func(){

ctrlBMI.setValue(Number(ctrlWeight.getValue()) * 703 / Number(ctrlHeight.getValue()) / Number(ctrlHeight.getValue()));

}

ctrlHeight.on('keyup', func);

ctrlWeight.on('keyup', func);