Hello,
There was not any error message or malfunction. The field expecting the result was empty (no zero - just blank)
Should I have this set as a calculated - I am assuming not but is set as read only
Subtract a field from one table from a field in second table
Re: Subtract a field from one table from a field in second table
It does not matter if it is read only as we are doing the update inside the database, actually better to leave it as read only.
What is the type of this field `kgs_diff` in appgini and in database?
for sure should not be calculated, as every time it updates will remove or change the value.
No error and blank field usually means wrong data type used in field.
What is the type of this field `kgs_diff` in appgini and in database?
for sure should not be calculated, as every time it updates will remove or change the value.
No error and blank field usually means wrong data type used in field.
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper
Re: Subtract a field from one table from a field in second table
There is no error message. The field waiting for the result is empty no zero, just blank. This is not set as a calculated field but is set read only.
I am collecting the Init_weight from the users table at runtime in the new record option and it is present in the new record option . Also the rec_weight is entered by the user at run time in the new reord option so is it necessary to call the data from the users table in the new record option.
I am collecting the Init_weight from the users table at runtime in the new record option and it is present in the new record option . Also the rec_weight is entered by the user at run time in the new reord option so is it necessary to call the data from the users table in the new record option.
Re: Subtract a field from one table from a field in second table
Kgs_diff is read only decimal to 2 places
Re: Subtract a field from one table from a field in second table
rec_kgs and initkgs also decimal 2 places?
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper
Re: Subtract a field from one table from a field in second table
Try
instead of
did you ever try the calculated field solution provided?
Code: Select all
$initkgs = sql("Select `init_kgs` from `users` where `id` = '{$data['user_id']}' ",$eo)+0;
Code: Select all
$initkgs = sqlvalue("Select `init_kgs` from `users` where `id` = '{$data['user_id']}' ",$eo)+0;
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Subtract a field from one table from a field in second table
Yes I did try the calculated field but I couldn’t get that to work, hence my enquiry to the forum