insert multiple lines in a subform.

Questions related to customising nuBuilder Forte with JavaScript or PHP.

Re: insert multiple lines in a subform.

Unread postby kev1n » Fri Jul 16, 2021 4:57 am

It would also make it a great deal easier if you could create a minimal example that form/subform together with some dummy data. Then upload the db dump here so I can further assist you.
kev1n
nuBuilder Team
 
Posts: 1996
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: insert multiple lines in a subform.

Unread postby johan » Fri Jul 16, 2021 8:38 pm

Kev1n

Here's my printscreen
Johan
Attachments
Selectie_308.png
subform
Selectie_308.png (27.02 KiB) Viewed 199 times
Selectie_307.png
form
Selectie_307.png (26.02 KiB) Viewed 199 times
johan
 
Posts: 340
Joined: Sun Feb 27, 2011 7:46 pm
Location: Belgium

Re: insert multiple lines in a subform.

Unread postby kev1n » Sat Jul 17, 2021 1:54 pm

Is new data entered in (1) and then before saving, it should check if (1) does not exist in (2) ?
Attachments
data.png
data.png (36.8 KiB) Viewed 196 times
kev1n
nuBuilder Team
 
Posts: 1996
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: insert multiple lines in a subform.

Unread postby johan » Sat Jul 17, 2021 2:19 pm

Kev1n

When entering a new activity, user must enter 1.
Based on this info, 2 must be entered before saving or maybe even better with object RUN.
In this example I entered an activity that takes place weekly between 15 and 22/7.
Employee afterwards still must have the option to make changes in 2?

Johan
johan
 
Posts: 340
Joined: Sun Feb 27, 2011 7:46 pm
Location: Belgium

Re: insert multiple lines in a subform.

Unread postby kev1n » Sat Jul 17, 2021 2:25 pm

Can't (2) be generated automatically from (1) when the form is saved? For each day a row is added to (2)
kev1n
nuBuilder Team
 
Posts: 1996
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: insert multiple lines in a subform.

Unread postby johan » Sat Jul 17, 2021 3:02 pm

Yes that's the idea for a new form.
I have to check with SQL that the room is available on that moment.
When available fill in the room, if not add date, hours and leave room empty so user can choose An other room
johan
 
Posts: 340
Joined: Sun Feb 27, 2011 7:46 pm
Location: Belgium

Re: insert multiple lines in a subform.

Unread postby kev1n » Sat Jul 17, 2021 3:17 pm

Could you also post a screenshot of the db columns of the main form?
kev1n
nuBuilder Team
 
Posts: 1996
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: insert multiple lines in a subform.

Unread postby johan » Sat Jul 17, 2021 3:42 pm

Printscreen in attachment.
Johan
Attachments
Screenshot_20210717-080320__01.jpg
Screenshot_20210717-080320__01.jpg (268.09 KiB) Viewed 191 times
johan
 
Posts: 340
Joined: Sun Feb 27, 2011 7:46 pm
Location: Belgium

Re: insert multiple lines in a subform.

Unread postby kev1n » Sat Jul 17, 2021 4:23 pm

Could you export the db schema of these two tables to an .sql file? Then I'll try to create a demo on our test platform.
kev1n
nuBuilder Team
 
Posts: 1996
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: insert multiple lines in a subform.

Unread postby johan » Sat Jul 17, 2021 5:25 pm

Kev1n
SQL export of my tables.
We'll use this database for our work in a prison.
So I have to add extra conditions in my select query when a room can be used.
Every room has his max capacity and a room is in a section of the prison. Every section also has it's max capacity. But SQL is not a problem.
johan
 
Posts: 340
Joined: Sun Feb 27, 2011 7:46 pm
Location: Belgium

PreviousNext

Return to Custom Code

Who is online

Users browsing this forum: No registered users and 5 guests

cron