Prepopulate List Attribute


I am trying to make it so that when someone creates a new object, the first field which is Department will be automatically set depending on the object type selected. Currently the department metadata (responsibleDept) is set as a drop down list attached to list (departments_list). In this instance the indo for the concept in the list I would like automatically selected is stock_dep. I feel like I have tried everything to try and get this prepopulate to work. I think I am getting stuck on the list idno thing but I am not sure how to change it to get it operational. Here is what I currently have:

enabled = 1

prepopulate_fields_on_save = 1

prepopulate_fields_on_edit = 1

prepopulate_rules = {

# -------------------

stockdepartment_rule = {

table = ca_objects,

restrictToTypes = [stock_costume],

mode = overwrite,

target = ca_objects.respondsibleDept,

template = ^ca_lists.departments_list.stock_dep,


# -------------------


Thank you for your help!

Sign In or Register to comment.