- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2016 01:50 PM
I've created a Document ID field following the Creating a Document ID field wiki article. In my case I made my u_document_id field dependent on my u_table field, which I made a choice list of two values: cmn_location and service_offering. I was hoping that would limit the list of table options for my u_document_id field but it did not. When I click my u_document_id field, I get the modal DocumentID popup which shows "Table Name" field and "Document" field and all tables are available in the "Table Name" field. It does not seem to be limiting my list of choices as I wanted.
How do I accomplish this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2016 07:20 PM
It can be done using the tableChoicesScript dictionary attribute documented here (tested in Helsinki).
Create a Script Include with a method named process() that returns an array of table names.
Add the tableChoicesScript attribute to the table field (not the Document ID field) and point it at the custom Script Include.
Attributes: tableChoicesScript=myTableFilter
Script Include: myTableFilter
var myTableFilter = Class.create();
myTableFilter.prototype = {
initialize: function() {
},
process: function() {
return ['incident','problem'];
},
type: 'myTableFilter'
};
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2016 07:20 PM
It can be done using the tableChoicesScript dictionary attribute documented here (tested in Helsinki).
Create a Script Include with a method named process() that returns an array of table names.
Add the tableChoicesScript attribute to the table field (not the Document ID field) and point it at the custom Script Include.
Attributes: tableChoicesScript=myTableFilter
Script Include: myTableFilter
var myTableFilter = Class.create();
myTableFilter.prototype = {
initialize: function() {
},
process: function() {
return ['incident','problem'];
},
type: 'myTableFilter'
};
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2016 06:13 AM
Michael:
Sorry for my slow response to your reply. Your suggestion worked! I never knew that. Thank you! BTW, it worked in Geneva too (since that is the version I'm dealing with).