I have a MIGXdb config set up to list all the products in the catalog (productcatalog). I want to pull this into a different MIGXdb configuration (ProdClasses) that lists the categories. In a second tab of the category form, I want to pull in the productcatalog config BUT only show the items whose category id matches the one that is being edited.
{
"formtabs":[
{
"MIGX_id":2,
"caption":"General",
"print_before_tabs":"0",
"fields":[
{
"MIGX_id":6,
"field":"prodno",
"caption":"Product Number",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"text",
"configs":"",
"sourceFrom":"config",
"sources":"[]",
"inputOptionValues":"",
"default":"",
"pos":1
},
{
"MIGX_id":7,
"field":"prodname",
"caption":"Product Name",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"text",
"configs":"",
"sourceFrom":"config",
"sources":"[]",
"inputOptionValues":"",
"default":"",
"pos":2
},
{
"MIGX_id":12,
"field":"hidden",
"caption":" ",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"checkbox",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":" Hide Product?==1",
"default":"0",
"useDefaultIfEmpty":"0",
"pos":3
},
{
"MIGX_id":8,
"field":"classid",
"caption":"Category",
"description":"",
"description_is_code":"0",
"inputTV":"ProductCategories",
"inputTVtype":"",
"configs":"",
"sourceFrom":"config",
"sources":"[]",
"inputOptionValues":"",
"default":"",
"pos":4
},
{
"MIGX_id":9,
"field":"description",
"caption":"Description",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"richtext",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":5
}
],
"pos":1
},
{
"MIGX_id":7,
"caption":"Features & Inclusions",
"print_before_tabs":"0",
"fields":[
{
"MIGX_id":17,
"field":"features",
"caption":"Features",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"richtext",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":1
},
{
"MIGX_id":18,
"field":"inclusions",
"caption":"Inclusions",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"richtext",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":2
}
],
"pos":2
},
{
"MIGX_id":3,
"caption":"Specifications",
"print_before_tabs":"0",
"fields":[
{
"MIGX_id":13,
"field":"specifications",
"caption":"Specifications",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"migx",
"validation":"",
"configs":"productspecs",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":1
}
],
"pos":3
},
{
"MIGX_id":4,
"caption":"Model Options",
"print_before_tabs":"0",
"fields":[
{
"MIGX_id":14,
"field":"options",
"caption":"Model Options",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"migx",
"configs":"ModelOptions",
"sourceFrom":"config",
"sources":"[]",
"inputOptionValues":"",
"default":"",
"pos":1
}
],
"pos":4
},
{
"MIGX_id":5,
"caption":"Images",
"print_before_tabs":"0",
"fields":[
{
"MIGX_id":15,
"field":"images",
"caption":"",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"migx",
"validation":"",
"configs":"images",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":1
}
],
"pos":5
},
{
"MIGX_id":6,
"caption":"Accessories",
"print_before_tabs":"0",
"fields":[
{
"MIGX_id":16,
"field":"accessories",
"caption":"Recommended Accessories",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"richtext",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":1
}
],
"pos":6
}
],
"contextmenus":"update||duplicate||activate||deactivate||recall_remove_delete||remove",
"actionbuttons":"addItem",
"columnbuttons":"",
"filters":[
{
"MIGX_id":1,
"name":"search",
"label":"Search",
"emptytext":"",
"type":"textbox",
"getlistwhere":{
"prodno:LIKE":"%[[+search]]%",
"OR:prodname:LIKE":"%[[+search]]%"
},
"getcomboprocessor":"",
"combotextfield":"",
"comboidfield":"",
"comboparent":"",
"default":""
}
],
"extended":{
"migx_add":"",
"disable_add_item":"",
"add_items_directly":"",
"formcaption":"Manage the catalog products in the grid below",
"update_win_title":"Product Catalog",
"win_id":"productcatalog",
"maxRecords":"",
"addNewItemAt":"top",
"multiple_formtabs":"",
"multiple_formtabs_label":"",
"multiple_formtabs_field":"",
"multiple_formtabs_optionstext":"",
"multiple_formtabs_optionsvalue":"",
"actionbuttonsperrow":3,
"winbuttonslist":"",
"extrahandlers":"this.handlePositionSelector",
"filtersperrow":2,
"packageName":"productcatalog",
"classname":"Catalog",
"task":"",
"getlistsort":"",
"getlistsortdir":"",
"sortconfig":"",
"gridpagesize":50,
"use_custom_prefix":"0",
"prefix":"",
"grid":"",
"gridload_mode":2,
"check_resid":1,
"check_resid_TV":"",
"join_alias":"Images",
"has_jointable":"yes",
"getlistwhere":"",
"joins":[
{
"classname":"ProdClass",
"alias":"ProductCategory",
"on":"ProductCategory.id=classid"
}
],
"hooksnippets":"",
"cmpmaincaption":"Product Catalog",
"cmptabcaption":"Products",
"cmptabdescription":" ",
"cmptabcontroller":"",
"winbuttons":"",
"onsubmitsuccess":"",
"submitparams":""
},
"columns":[
{
"MIGX_id":1,
"header":"ID",
"dataIndex":"id",
"width":"",
"sortable":"false",
"show_in_grid":"0",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"[]"
},
{
"MIGX_id":2,
"header":"Product No",
"dataIndex":"prodno",
"width":50,
"sortable":true,
"show_in_grid":1,
"renderer":"",
"clickaction":"selectFromGrid",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"[]"
},
{
"MIGX_id":3,
"header":"Name",
"dataIndex":"prodname",
"width":500,
"sortable":true,
"show_in_grid":1,
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"[]"
},
{
"MIGX_id":4,
"header":"Classification",
"dataIndex":"ProductCategory_classname",
"width":"",
"sortable":true,
"show_in_grid":1,
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"[]"
},
{
"MIGX_id":5,
"header":"Sort Order",
"dataIndex":"menuindex",
"width":"",
"sortable":true,
"show_in_grid":1,
"customrenderer":"",
"renderer":"this.renderPositionSelector",
"clickaction":"selectFromGrid",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":""
}
]
}
{
"formtabs":[
{
"MIGX_id":1,
"caption":"Product Class",
"print_before_tabs":"0",
"fields":[
{
"MIGX_id":1,
"field":"classname",
"caption":"Classification Title",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"",
"configs":"",
"sourceFrom":"config",
"sources":"[]",
"inputOptionValues":"",
"default":"",
"pos":1
},
{
"MIGX_id":5,
"field":"shortname",
"caption":"Display Name",
"description":"An alternate name to display. Overrides the Category Name",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"text",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":2
},
{
"MIGX_id":2,
"field":"summary",
"caption":"Category Summary",
"description":"This is the text that will show up on the Section Landing page",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"richtext",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":3
},
{
"MIGX_id":3,
"field":"classimg",
"caption":"Category Image",
"description":"Choose an image to represent this category. If none is chosen, it will default to the first product of this category.",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"image",
"configs":"",
"sourceFrom":"config",
"sources":"[]",
"inputOptionValues":"",
"default":"",
"pos":4
},
{
"MIGX_id":4,
"field":"classpri",
"caption":"Priority",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"number",
"configs":"",
"sourceFrom":"config",
"sources":"[]",
"inputOptionValues":"",
"default":"",
"pos":5
}
],
"pos":1
},
{
"MIGX_id":14,
"caption":"Products",
"print_before_tabs":"0",
"fields":[
{
"MIGX_id":34,
"field":"Products",
"caption":"",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"migxdb",
"validation":"",
"configs":"productcatalog",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":1
}
],
"pos":2
}
],
"contextmenus":"update||duplicate||remove",
"actionbuttons":"addItem",
"columnbuttons":"update||duplicate||remove",
"filters":"",
"extended":{
"migx_add":"Add Class Name",
"disable_add_item":"",
"add_items_directly":"",
"formcaption":"",
"update_win_title":"",
"win_id":"ProdClasses",
"maxRecords":30,
"addNewItemAt":"bottom",
"multiple_formtabs":"",
"multiple_formtabs_label":"",
"multiple_formtabs_field":"",
"multiple_formtabs_optionstext":"",
"multiple_formtabs_optionsvalue":"",
"actionbuttonsperrow":2,
"winbuttonslist":"",
"extrahandlers":"this.handlePositionSelector",
"filtersperrow":1,
"packageName":"productcatalog",
"classname":"ProdClass",
"task":"",
"getlistsort":"classpri",
"getlistsortdir":"ASC",
"sortconfig":"",
"gridpagesize":"",
"use_custom_prefix":"0",
"prefix":"",
"grid":"",
"gridload_mode":2,
"check_resid":"0",
"check_resid_TV":"",
"join_alias":"",
"has_jointable":"no",
"getlistwhere":"",
"joins":"",
"hooksnippets":"",
"cmpmaincaption":"Category Manager",
"cmptabcaption":" Categories",
"cmptabdescription":" Manage the available product categories.",
"cmptabcontroller":"",
"winbuttons":"",
"onsubmitsuccess":"",
"submitparams":""
},
"columns":[
{
"MIGX_id":1,
"header":"id",
"dataIndex":"id",
"width":"",
"sortable":"false",
"show_in_grid":"0",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"[]"
},
{
"MIGX_id":3,
"header":"Priority",
"dataIndex":"classpri",
"width":"",
"sortable":true,
"show_in_grid":1,
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"[]"
},
{
"MIGX_id":2,
"header":"Classification Title",
"dataIndex":"classname",
"width":"",
"sortable":true,
"show_in_grid":1,
"renderer":"",
"clickaction":"selectFromGrid",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"[]"
}
]
}
how do i set up a conditional to remove the none matching items from productcatalog migxdb based on the current ProdClasses id (which is saved in the class_id field of the productcatalog db table)?
Once pulled in, will I be able to edit the products listed from the ProdClass CMP?