You can narrow down the choices of model reference depending on the value of other items.
An example in which "choice of our person in charge" changes when "designate department in charge" is specified.
Figure 2 shows the state in which the department in charge has not been selected.At this time, we can not select any person in charge.
If the department in charge is the general affairs department, the person in charge belonging to the general affairs department is displayed as a choice.
If the department in charge is also the sales department, the person in charge belonging to the sales department is displayed as a choice.
The model has "staff" "job category" "department" "customer".Since "job category" is an option model, we omit explanation.
In the "department" model, prepare the primary key "department ID" and "department name".
The "staff" model refers to the "department" model.(FIGS. 7 and 8)
We refer to the department model as the "customer" model as "department in charge of our company" and the staff model as "person in charge of our company" respectively.(FIG. 9, FIG. 10, FIG. 11)
We will set the refinement here.Set "Input control> Model reference (narrowed down)" from the detail dialog of "Company contact person" item.
I will explain an example of narrowing down shown in Fig.Prepare two narrowing conditions.
Suppose that a choice model "job title" is prepared as follows.The ID of the job "general" is "4".
The condition that "job type is general only" was added to the narrowing-down condition.Compared with Figure 4, the number of choices is decreasing.
We will add a narrowing-down condition for our company personnel item in the customer model.(Fig. 16) A fixed condition that the ID value of job title (title) is "4" is added.
You can specify the item in the repeating container as the condition for narrowing down.
We have four employees registered.(FIG. 18)
Assign two employees to "Project 1" and "Project 2" respectively.(FIG. 19, FIG. 20)
Register work results.In conjunction with the selected employee, the choices of the project are narrowed down.(FIG. 21, FIG. 22)
We have "Employees", "Work Projects" and "Work Results" as models.
"Employee" model consists of ID and name.
In the "work project" model, there are multiple employees in one project.It is realized with repeating containers.
We will narrow down the project items in the "work achievement" model.
Set a refinement rule that "Employee ID" item (included in the same model) is included in "Employee ID (member/staffid)" (item of reference target model "Work project").
This function includes the specified refinement condition in SQL where clause.That is, narrowing down is done in the database.
In the case where the value of the narrowing source is changed (in the above example, the value of "department in charge in charge" was changed), the value selected as "person in charge of our company"MaintenanceIt will be.
This also applies to the case where the value of the narrowing source is cleared.The choice of the narrowing destination is maintained.
(We plan to extend it so that we can choose whether to keep or narrow down the choice of the narrowing destination in the future Wagby.)
In narrowing down the date type items, as a fixed valueSpecial notation nowYou can use.You can narrow down by today's date.
You can not narrow down to suggestion items.(Setting does not work.)
If the narrowing-down item is defined as an out-of-container item and the narrowing-down item is defined as a repeating container item, only the data in the first row of the container will be used for narrowing down.
Data on the second and subsequent lines are not used as refinement and are ignored.
If refinement is not performed properly, please confirm the following points.