Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Combine Calc-Field with Select-Field and Number-Field?

Questions related to using nuBuilder Forte.
Olikun
Posts: 68
Joined: Tue Mar 09, 2021 6:45 pm

Combine Calc-Field with Select-Field and Number-Field?

Unread post 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

Image
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Combine Calc-Field with Select-Field and Number-Field?

Unread post 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.
Olikun
Posts: 68
Joined: Tue Mar 09, 2021 6:45 pm

Re: Combine Calc-Field with Select-Field and Number-Field?

Unread post 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?
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Combine Calc-Field with Select-Field and Number-Field?

Unread post 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.
You do not have the required permissions to view the files attached to this post.
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: Combine Calc-Field with Select-Field and Number-Field?

Unread post by Janusz »

If you like nuBuilder, please leave a review on SourceForge
Olikun
Posts: 68
Joined: Tue Mar 09, 2021 6:45 pm

Re: Combine Calc-Field with Select-Field and Number-Field?

Unread post 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
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: Combine Calc-Field with Select-Field and Number-Field?

Unread post by Janusz »

should be OK now
If you like nuBuilder, please leave a review on SourceForge
Olikun
Posts: 68
Joined: Tue Mar 09, 2021 6:45 pm

Re: Combine Calc-Field with Select-Field and Number-Field?

Unread post 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


Image
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Combine Calc-Field with Select-Field and Number-Field?

Unread post by kev1n »

Use a Calc object type for field 3 and add a calculation.
Olikun
Posts: 68
Joined: Tue Mar 09, 2021 6:45 pm

Re: Combine Calc-Field with Select-Field and Number-Field?

Unread post by Olikun »

:roll:
Oh yes right

I already know the Calc function

it was a stupid question :lol: :oops:
Post Reply