Page 1 of 5
insert multiple lines in a subform.
Posted: Tue Jul 13, 2021 7:29 pm
by johan
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
Re: insert multiple lines in a subform.
Posted: Tue Jul 13, 2021 7:48 pm
by kev1n
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.
Re: insert multiple lines in a subform.
Posted: Tue Jul 13, 2021 8:29 pm
by johan
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
Re: insert multiple lines in a subform.
Posted: Tue Jul 13, 2021 8:35 pm
by kev1n
When should the check take place? Before saving the form or at some point before?
Re: insert multiple lines in a subform.
Posted: Tue Jul 13, 2021 8:49 pm
by johan
It would be nice if It could do a check before save with an alert after save.
Re: insert multiple lines in a subform.
Posted: Tue Jul 13, 2021 9:01 pm
by kev1n
What's your nuBuilder version?
Re: insert multiple lines in a subform.
Posted: Tue Jul 13, 2021 9:15 pm
by johan
Nubuilder4. Ik could update if that's easier.
Re: insert multiple lines in a subform.
Posted: Wed Jul 14, 2021 7:50 am
by kev1n
Which columns should be checked for duplicates? first date, last date, room ?
Re: insert multiple lines in a subform.
Posted: Wed Jul 14, 2021 8:27 am
by johan
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
Re: insert multiple lines in a subform.
Posted: Wed Jul 14, 2021 8:33 am
by kev1n
Could you post a screenshot of your form and also the Ids of your subform columns.