Scripting with catalog variables on tasks (sc_item_option_mtom) table

nmartinez
Kilo Contributor

I am familiar with accessing [sc_item_option] and [sc_item_option_mtom] to query, modify and even create new catalog variables for request items via scripting; however I am trying to figure out how to associate catalog variables with newly created catalog tasks via scripting in the same fashion that it is done via the visual workflow.

I assume that there must be a related table that connects the catalog variables to the catalog task and then not unlike [sc_item_option_mtom] that would reference the catalog task's sys_id and the [sc_item_option] record. If there is such a table it does not have the "mtom" in the table's name. My second guess was that it would be either a script include or a business rule that is dynamically associating the variables to the catalog tasks. However I've yet to find any scripts that perform this function.

If anyone knows how to accomplish this, I would appreciate some help.

23 REPLIES 23

What is the name of the UI Macro ?


bt6lw
Giga Contributor

I think we are missing each other somewhere.




Do you want a list view i.e. sc_task_list.do



or do you want the list of vatriables in a sc_task.do?


I think what the questioner wanted was to have the variables show up in the list view and that is how i was answering the question. So far i don't think it is possible unless you put them as fields in a table, and the best practice around that if you want to add fields to the sc_task table is to use a reference to another table and have the fields in the other table so you subgroup them by domain in case you need to add more fields later on for another purpose.



If you think this can be done without doing it this way, i will be happy to hear the solution.


bt6lw
Giga Contributor

Ah...



Now I see where we not understanding each other.



I was responding to this question of his



" however I am trying to figure out how to associate catalog variables with newly created catalog tasks via scripting in the same fashion that it is done via the visual workflow."


Thanks for clarifying. I learned something new from you as well.