Combining data input with existing record data

Combining data input with existing record data


In our app we need to allocate a given amount of value to a number of different investors.  The allocation is relatively simple as each investor gets a proportion of the amount to allocate equal to their proportion of the total amount invested.

We are looking at having a web page that performs this calculation and create the relevant records once calculated.  The web page would look like the table below but combines 3 different things.

  1. Pulls information (name and SUM for a particular attribute) from a specific Data Entity (this info is shaded in light green in the table below)
  2. The amount to be allocated is input in the table (this is shaded in light orange in the table below)
  3. Calculation based on the input and data pulled out (this is shaded in light yellow in the table below)

The number of items listed (ie rows) will vary depending on what is queried. 

Interested to get thoughts on the best way to do this.  It seems like a table or editable table where most of the data is locked down but can't seem to get it to make the relevant calculations and let the first line of the 3rd column be an input

Net Balance
Remaining Balance

Investor #1
 . . . . . 
 . . . . . 
 . . . . . 
 . . . . . 
Investor #N



Info from Data Entity

Hello Richard,

Why don't you use a ListRecord for the variable part (second line and below), and above it you put a static line (using expressions) with an input for the user input data (third column, first line)?

The ListRecord you can create it any way you want, and style it as you wish.



Hi Richard,

If you use a Table Records, you can place an input field on the third column, and either a button next to it to submit data or using OnChange event (or you can use something like the JavaScript onblur event, trickier but probably nicer in terms of UX).

The screen action that handles the button/OnChange event would then perform any required calculations and update the TableRecords.List.Current record and Ajax Refresh the fourth column. (the TableRecords.List is the runtime variable that holds the actual list data displayed by the TableRecords).


Thanks for that.  Very helpful. 

Are there any benefits or disadvantages to using Table Records compared to Table List?

Hi Richard. 

The difference is that Jorge missed that the input is only in the first line (according to your picture). Using a Table Records with an input will put the input in every line.

The Table Records has a predefined format, while the List Records not (It's easier to style it in any way).

If Borrower line and net value is stored in the same entity in database, you can use an IF to make the input appear the calculation. If not, you will be better putting this line above the list/table.

Particularly, if it is the case is the second case where data is in separated entitiea, I would still use a ListRecords, but if you prefer to use a TableRecords you have the option to remove the Header of the table, to make it more like the picture.

I tend to use Table records only when the table is homogeneous.