Options to include

schnils

New member
Hi guys,

after years using DaDaBik successfully, I'm moving into trouble. I'm using a rather old version 5.x with a lot of workarounds (so I can't upgrade easily).
I am trying to have the "Options to include" depending on the case. For example. I am having a table with information about teachers, their planned lessons and the time they wish to teach and the module at the university:

Table_Planning
tbl_name_of_teacher, tbl_title_of_lesson, tbl_time, tbl_module

at the moment the teachers are able to chose the time out of a predefined select single field (e.g. "Monday 8-10~Monday10-12~" ...etc,).

Now we have the Problem, that there are more important lessons, so I want the teachers only to be able to get specific times to choose.
E.g. when they edit a record in the modul "Beginners", they are only allowed to chose specific (before defined) times. And if they choose "Master-Class" they are able to choose other times.

I thought about a new table (e.g. Times) but Dadabik doesn't offer the possibility to say:
"If modul is x, take the options to include from the table y"

Has someone a hint or an idea?

Thanks so much for your help with this great product!

Nils
 

schnils

New member
Just to add some more information...and questions:
I think that Dadabik 6.3 Enterprise has that what I want...variables in the where clause. Just before I buy it, I want to be shure that it works.

I have two tables. One is completely ready and finished it won't be changed.
table1:
- id
- name_of_category
- times_allowed

The second one is the table to be partly edited by the users...I write partly, because the name_of_category is fixed before by me.

table2
- id
- name_of_teacher
- name_of_category
- time_of_lesson

First of all I link the fields for the select single field:

Primary key field id
Primary key table table1
Linked fields Help times_allowed

If I use now the "where clause" in the forms configurator, can I use something like this?:

where clause: name_of_category = table_2_name_of_category

This is exactly what I need. The dropdownlist will be limited

Thanks for your answers,

yours
Nils
 

eugenio

Administrator
Staff member
Hi, I don't understand very well the question: with filtered dropdown you can add a where clause based on any global variable (if a variable is not global, you add some PHP code to have it in the global space) but I don't get this:
name_of_category = table_2_name_of_category
can you make some examples?
 

eugenio

Administrator
Staff member
Ok, now I see, I think you actually want cascade dropdown menus: when I choose name_catogry, automatically the time_of_lesson listbox must reload with filtered values according to name_catogry just chosen, am I right? At the moment it is not possible because the filter is applied to the listbox before the page is loaded.
 

schnils

New member
Dear Eugenio, thanks for your answer.
I think that you understood me right. But it is really so, that the filter is loaded before the edit-function of each dataset?

Anyway: would be a nice feature to have those cascading listboxes...

Yours

Nils
 
Top