![]() |
Sergey Kornilov admin 11/13/2023 |
We have click events for table rows and individual fields but it will not work here because this is not a regular grid but a lookup wizard. I think you are looking for something custom, maybe to you can use multi-select lookup wizard to avoid selecting any question more than once. |
G
|
Grdimitris 11/13/2023 |
Lets asume that the master table named master_t has fileds id and description. The details table named detail_t has fileds id,master_id and d_question. The table full_list has fields id,group_id and question. SELECT question FROM full_list WHERE (question not in (select question from details_t)) In where write If the questions is for all the master records the same then leave the where empty. |
P
|
PK author 11/14/2023 |
Thank you Grdimitris, So in this statement.. I need to specify the group_id in the details_t part of the query right? Like this: SELECT question FROM full_list WHERE (question not in (select question from details_t where master_id = id_of_the_selected_master_record )), otherwaise it will exclude questions in the full_list which exist in the details_t but belonging to ther group (or master id). That is where the problem is, I dont have the master_id to use in the query until the user has clicked the link. And when that link is clicked no event is raised for me catch and do a Before SQL Query on the questions list before it pops up. |
G
|
Grdimitris 11/14/2023 |
The master_id is the id of the your master table. I mean is the link field between your master table and your detail table.
|
P
|
PK author 11/15/2023 |
Hi Grdimitris, CREATE TABLE `appraisal_360_master` ( Then this is for the master table of Groups CREATE TABLE `appraisal_360_groups` ( Then this is for the details table CREATE TABLE `appraisal_360_group_lines` ( then the relationship looks like this:
So the QuestionID in appraisal_360_group_lines is filled from ID in appraisal_360_master using Lookup wizard. An item in appraisal_360_master can be put in appraisal_360_group_lines more than once if only in a different group. So for instance in appraisal_360_group_lines you can have this:
In this case when I select group 1 and trying to add new questions, Question 1, 2 and 3 from appraisal_360_master should not be in the list and if I select group 2, then question 1 and 3 should not be in the list. |
G
|
Grdimitris 11/15/2023 |
Create a custom view to table appraisal_360_master with this sql and lets call the view as appraisal_360_questions. Then in table appraisal_360_group_lines set the field groupID as Lookup field using the custom view appraisal_360_questions Dont forget to allow details table to appear in edit and view page of appraisal_360_groups table and in Pages pane change the Add new Settings to After record is added to Openthe new record Edit page. |
P
|
PK author 11/15/2023 |
Grdimitris, Thank you so much. |