Page 1 of 2
Combine Calc-Field with Select-Field and Number-Field?
Posted: Fri Mar 12, 2021 8:30 pm
by Olikun
Hello,
i have a new question.
I would like to combine a Calc field with a Select and Number field.
I declare:
We work with meat.
The meat must be marinated.
We have 2 types
Type "salt": with salt / without pepper
Type "pepper": without salt / with pepper
The Calc field should display the correct amount, depending on what was specified in the Select field.
The meat is entered in kg in the Number field
I have another picture

Re: Combine Calc-Field with Select-Field and Number-Field?
Posted: Sat Mar 13, 2021 7:26 am
by kev1n
Code: Select all
The Calc field should display the correct amount, depending on what was specified in the Select field.
I don't understand how it should be calculated. Please write down the conditions/caluclation logic.
Re: Combine Calc-Field with Select-Field and Number-Field?
Posted: Sun Mar 14, 2021 7:53 am
by Olikun
Janusz wrote:Hi Olikun,
I prepared short example/demo how to implement time recording with nuBuilder.
And some calculation example on the form - for the spices calculation
You can find video with explanation on youtube:
https://youtu.be/LJmKrOQ-AP8
This demo is available on our server:
https://test.nubuilder.cloud/
you can log with:
login: test
psw: nutest
This is in demo mode so you can have access to the used code - but if you implement some changes it will not be finally saved.
If you would have some questions please let me know.
Hello Janusz,
thank you so much, you are great
I have successfully recreated the Spice Tool.
The values are calculated, but I cannot save it
I recreated the whole form in my test nuBuilder and all field names are identical
Do you know what the problem is?
Re: Combine Calc-Field with Select-Field and Number-Field?
Posted: Sun Mar 14, 2021 8:36 am
by kev1n
There can be various reasons why saving does not work.
- Check the nuDebug Results for errors
- Check the Developer Console (F12) for errors
- Check your (Apache) Server log
Did you also add the Custom Code and the 2 onchange events?
I attached to files that contain SQL statements to create the demo. Run them in phpMyAdmin to generate a table calculation and the nuBuilder objects.
Re: Combine Calc-Field with Select-Field and Number-Field?
Posted: Sun Mar 14, 2021 9:43 am
by Janusz
Re: Combine Calc-Field with Select-Field and Number-Field?
Posted: Sun Mar 14, 2021 5:53 pm
by Olikun
Hello Janusz,
I have created the whole form again but it does not work with the save yet.
I have sent you the login details for my nuBuilder.
Can you please, if you have the time, see what the problem is?
that would be extremely great
Re: Combine Calc-Field with Select-Field and Number-Field?
Posted: Sun Mar 14, 2021 6:20 pm
by Janusz
should be OK now
Re: Combine Calc-Field with Select-Field and Number-Field?
Posted: Sat Apr 03, 2021 5:51 pm
by Olikun
I have a new question on this subject
The code works and I am using it, but I need new code elsewhere
I just want to take a field x 10 and output the result in a new field

Re: Combine Calc-Field with Select-Field and Number-Field?
Posted: Sat Apr 03, 2021 5:58 pm
by kev1n
Use a Calc object type for field 3 and add a calculation.
Re: Combine Calc-Field with Select-Field and Number-Field?
Posted: Sat Apr 03, 2021 6:05 pm
by Olikun
Oh yes right
I already know the Calc function
it was a stupid question
