Welcome to the nuBuilder Forums!

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

insert multiple lines in a subform.

Questions related to customising nuBuilder Forte with JavaScript or PHP.
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 446 times
Contact:

Re: insert multiple lines in a subform.

Unread post by kev1n »

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.
johan
Posts: 399
Joined: Sun Feb 27, 2011 11:16 am
Location: Belgium
Been thanked: 3 times

Re: insert multiple lines in a subform.

Unread post by johan »

Kev1n

Here's my printscreen
Johan
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 446 times
Contact:

Re: insert multiple lines in a subform.

Unread post by kev1n »

Is new data entered in (1) and then before saving, it should check if (1) does not exist in (2) ?
You do not have the required permissions to view the files attached to this post.
johan
Posts: 399
Joined: Sun Feb 27, 2011 11:16 am
Location: Belgium
Been thanked: 3 times

Re: insert multiple lines in a subform.

Unread post by johan »

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

Re: insert multiple lines in a subform.

Unread post by kev1n »

Can't (2) be generated automatically from (1) when the form is saved? For each day a row is added to (2)
johan
Posts: 399
Joined: Sun Feb 27, 2011 11:16 am
Location: Belgium
Been thanked: 3 times

Re: insert multiple lines in a subform.

Unread post by johan »

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

Re: insert multiple lines in a subform.

Unread post by kev1n »

Could you also post a screenshot of the db columns of the main form?
johan
Posts: 399
Joined: Sun Feb 27, 2011 11:16 am
Location: Belgium
Been thanked: 3 times

Re: insert multiple lines in a subform.

Unread post by johan »

Printscreen in attachment.
Johan
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 446 times
Contact:

Re: insert multiple lines in a subform.

Unread post by kev1n »

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.
johan
Posts: 399
Joined: Sun Feb 27, 2011 11:16 am
Location: Belgium
Been thanked: 3 times

Re: insert multiple lines in a subform.

Unread post by johan »

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.
Post Reply