insert multiple lines in a subform.

Questions related to customising nuBuilder Forte with JavaScript or PHP.

insert multiple lines in a subform.

Unread postby johan » Wed Jul 14, 2021 2:59 am

Hi

I'm currently working on a form to help our employees schedule repetitive activities.
I want to use a subform where I want to automatically add multiple lines. Eg 1 row for each week of July.
When inserting a new line in the subform I would also like to check that the requested locale is still free. If not, I'd like to report it. However, I don't know how to build in this control. Anyone has a suggestion.
Thanks
Johan
johan
 
Posts: 340
Joined: Sun Feb 27, 2011 7:46 pm
Location: Belgium

Re: insert multiple lines in a subform.

Unread postby kev1n » Wed Jul 14, 2021 3:18 am

To add a new row, call the JavaScript function nuAddRow().

When inserting a new line in the subform I would also like to check that the requested locale is still free. If not, I'd like to report it


I don't quite understand that.
kev1n
nuBuilder Team
 
Posts: 2010
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: insert multiple lines in a subform.

Unread postby johan » Wed Jul 14, 2021 3:59 am

In every row of my subforum I want to reservate a meeting room. So I need to look up in my database tot be sure if they room is available before adding that row.

On thé form user adds first date, last date, room, frequency.
With that information I would like to add the subrows where they room is available and An alert for thé dates where they rooms are occupied
johan
 
Posts: 340
Joined: Sun Feb 27, 2011 7:46 pm
Location: Belgium

Re: insert multiple lines in a subform.

Unread postby kev1n » Wed Jul 14, 2021 4:05 am

When should the check take place? Before saving the form or at some point before?
kev1n
nuBuilder Team
 
Posts: 2010
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: insert multiple lines in a subform.

Unread postby johan » Wed Jul 14, 2021 4:19 am

It would be nice if It could do a check before save with an alert after save.
johan
 
Posts: 340
Joined: Sun Feb 27, 2011 7:46 pm
Location: Belgium

Re: insert multiple lines in a subform.

Unread postby kev1n » Wed Jul 14, 2021 4:31 am

What's your nuBuilder version?
kev1n
nuBuilder Team
 
Posts: 2010
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: insert multiple lines in a subform.

Unread postby johan » Wed Jul 14, 2021 4:45 am

Nubuilder4. Ik could update if that's easier.
johan
 
Posts: 340
Joined: Sun Feb 27, 2011 7:46 pm
Location: Belgium

Re: insert multiple lines in a subform.

Unread postby kev1n » Wed Jul 14, 2021 3:20 pm

Which columns should be checked for duplicates? first date, last date, room ?
kev1n
nuBuilder Team
 
Posts: 2010
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: insert multiple lines in a subform.

Unread postby johan » Wed Jul 14, 2021 3:57 pm

Kev1n
For each row I want to run a SQL
select to check if the room is still available.
If so he has to input date, room with thé last date <= enddate
There can't be duplicates on date in subform
johan
 
Posts: 340
Joined: Sun Feb 27, 2011 7:46 pm
Location: Belgium

Re: insert multiple lines in a subform.

Unread postby kev1n » Wed Jul 14, 2021 4:03 pm

Could you post a screenshot of your form and also the Ids of your subform columns.
kev1n
nuBuilder Team
 
Posts: 2010
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Next

Return to Custom Code

Who is online

Users browsing this forum: No registered users and 3 guests

cron