Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Filtering data in comboBox

    Hi all,

    I have a question. Is possible to filter the data that is shown in a ComboBox or PickList like the following code in the SC reference?
    I don't understand how to do that, I mean, using AdvancedCriteria. Someone has an example?


    Code:
    isc.DynamicForm.create({
        width: 500,
        numCols: 4,
        fields : [{
            name: "bugStatus", title: "Bug Status", 
            editorType: "comboBox",
            valueMap : {
                "new" : "New",
                "active" : "Active",
                "revisit" : "Revisit",
                "fixed" : "Fixed",
                "delivered" : "Delivered",
                "resolved" : "Resolved",
                "reopened" : "Reopened"
            }
        },{
            name: "itemName", title: "Item Name", editorType: "comboBox", 
            optionDataSource: "supplyItem", pickListWidth: 250
        }]
    });


    Thanks in advance.
    Last edited by larcman; 16 Sep 2013, 17:46.

    #2
    help?

    Version: 8.3

    Isomorphic,could you please help me with this?

    I just want to know, how to filter the data shown in my comboBox depending on the value selected in another combobox, here is what Im trying:

    Code:
    this.topForm = isc.DynamicForm.create({
    	ID: 'topForm',
                    
            fields: [{
    		name: 'Customer',
                    displayField: 'name',
                    valueField: 'customer_id',
    		changed: function (form, item, value) {
    			form.getField('address').setCriterion({
    		            	_constructor: 'AdvancedCriteria',
    		            	operator: 'and',
    		            	criteria: {
    		            		fieldName: 'customer_id',
    		            		operator: 'iContains',
    		            		value: value
    		            	}
    		}
    	}, {
    		name: address,
    		displayField: 'street',
    	        valueField: 'address_id',
    		optionDataSource: /* All the addresses stored in the DB*/
    	}]
    });
    As you can see, depending on the Customer selected, I want to refresh/show only the addresses for that customer! Thats it! But I've trying some ways without success.

    Thanks in advance.
    Last edited by larcman; 17 Sep 2013, 10:04.

    Comment


      #3
      Check out this old article: http://smartclientexperience.wordpre...-dependencies/

      Comment


        #4
        help!

        Thanks davidj6 for your help.

        That would help, but suppose that I use that method with an observer, now how I use optionDataSource using as a filter the value from the observed field?
        Thats the problem!!

        Thanks in advance.

        Comment

        Working...
        X