sorry no english
please help :
or sql, how to calculate this box
subform 'todczytpradu_subform'
Kon 'stan_koncowy'
Pocz 'stan_poczatkowy'
Cena 'cena'
KwZap 'kwota_zaplaty'
equation math (Kon - Pocz) * Cena update KwZap
Welcome to the nuBuilder forums!
Please register and login to view forums and other content only available to registered users.
Please register and login to view forums and other content only available to registered users.
help js
-
- Site Admin
- Posts: 2781
- Joined: Mon Jun 15, 2009 2:23 am
- nuBuilder Version: 4.5
- Been thanked: 1 time
Re: help js
darekmer,
Try this..
For Kon, Pocz and Cena..
darekmer,
Steven
Try this..
Code: Select all
function calc_row(pThis){
var p = $('#' + pThis.id).attr('data-prefix');
var a = $('#' + p + 'Kon').val();
var b = $('#' + p + 'Pocz').val();
var c = $('#' + p + 'Cena').val();
var x = (a - b) * c;
$('#' + p + 'Cena').val(x);
}
darekmer,
Steven
-
- Posts: 3
- Joined: Wed May 27, 2015 9:51 am
Re: help js
Welcome
I do not know English, google translator
not working or do not understand.
I wanted the result of this action appeared in the KwZap.
and nothing appears.
I would add that all four fields are in one table
I do not know English, google translator
not working or do not understand.
I wanted the result of this action appeared in the KwZap.
and nothing appears.
I would add that all four fields are in one table
- Attachments
-
- Bez tytułu2.png (33.11 KiB) Viewed 6254 times
-
- Site Admin
- Posts: 2781
- Joined: Mon Jun 15, 2009 2:23 am
- nuBuilder Version: 4.5
- Been thanked: 1 time
Re: help js
darekmer,
Are you wanting this update to be done as Kon, Pocz and Cena are edited on the Form or as the Form is saved (with SQL)?
Steven
Are you wanting this update to be done as Kon, Pocz and Cena are edited on the Form or as the Form is saved (with SQL)?
Steven
-
- Posts: 3
- Joined: Wed May 27, 2015 9:51 am
Re: help js
hello;)
Loading Data to the field 'Konc'.
The 'Pocz' is in the Default Value 'SELECT stan_koncowy FROM todczytpradu WHERE id_dzialki = '#RECORD_ID#'ORDER BY id_odczytu DESC
LIMIT 1 '.
field 'Cena' gets data from another table.
I want to field 'KwZap' automatically counted and saved in the table.
Loading Data to the field 'Konc'.
The 'Pocz' is in the Default Value 'SELECT stan_koncowy FROM todczytpradu WHERE id_dzialki = '#RECORD_ID#'ORDER BY id_odczytu DESC
LIMIT 1 '.
field 'Cena' gets data from another table.
I want to field 'KwZap' automatically counted and saved in the table.
-
- Site Admin
- Posts: 2781
- Joined: Mon Jun 15, 2009 2:23 am
- nuBuilder Version: 4.5
- Been thanked: 1 time
Re: help js
darekmer,
Just run
On Form After Save.
Steven
Just run
Code: Select all
UPDATE SubformTableName SET kwZap = (Kon - Pocz) * Cena
Steven