In an editable grid, I can use a SelectItem that shows available options that are returned by getEditorValueMap(). I wonder how to do this in a DynamicForm.
Announcement
Collapse
No announcement yet.
X
-
Please allow me to ask one more question for this particular case.
My application is built for an enterprise and defines the different companies of the holding and their departments. Until now I defined JavaScript arrays with the companies and the IDs of the departments belonging to those companies. I've replaced these arrays with client-only data sources.
Some people are authorized to edit data for all departments in a company, while others are only authorized for one (or a couple). The new client-only data sources make it easy to apply a company filter to get ALL departments for a company. But what for the second case? I need to compare the departments with a list of authorized departments. I could make a client-only data source for these authorizations but this list is too long. Therefore I only save their IDs and need to filter the departments data source. I guess there is no option to apply an array as filter?
Any ideas on that? If my use case isn't clear, please let me know.
Comment
-
Let me clarify my earlier example. Given this dataSource:
Code:var companiesDataSource = isc.DataSource.create({ clientOnly: true, fields: [ {name: 'id', primaryKey: true, type: 'integer'}, {name: 'name', type: 'text'} ], testData: [ {id: 1, name: 'Company X'}, {id: 2, name: 'Company Y'}, {id: 3, name: 'Company Z'} ] });
Comment
-
For everybody that wants to know the answer, I've just discovered it myself, so consider this question answered. :-)
Yes it's possible, I've added this to the company_id field (I chose to do this in the data source itself):
Code:getPickListFilterCriteria: function () { return { fieldName: 'id', operator: 'inSet', value: [1, 2] }; }
Comment
Comment