Announcement

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

    Hidden fields shown in pick lists

    Using version 12.1p LGPL of April 5th, 2020, I'm pretty sure that hidden pick list fields are shown, even if I define them as hidden in the data source.

    This stand-alone example would work if /orders.json and /customers.json exist, but it shows that the "Active" field is shown. This should work in 12.0p.

    Code:
        isc.setAutoDraw(false);
    
        isc.defineClass('MyDataSource', isc.RestDataSource).addProperties({
          dataFormat: 'json',
          jsonPrefix: '',
          jsonSuffix: '',
          sendMetaData: false
        });
    
        isc.DynamicForm.create({
          autoDraw: true,
          dataSource: isc.MyDataSource.create({
            dataURL: '/orders.json',
            fields: [
              { name: 'customer_id', displayField: 'name', type: 'integer', valueField: 'id' }
            ]
          }),
          fields: [
            {
              name: 'customer_id',
              optionDataSource: isc.MyDataSource.create({
                dataURL: /customers.json',
                fields: [
                  { hidden: true, name: 'id', primaryKey: true, type: 'integer' },
                  { hidden: true, name: 'active', type: 'boolean' },
                  { name: 'name', type: 'text' }
                ]
              }),
              pickListFields: [
                { name: 'active', hidden: true },
                { name: 'name' }
              ],
              pickListWidth: 400
            }
          ]
        });

    #2
    Thank you for the notification.
    We've made a change to address this issue (visible in nightly builds going forward on 12.1 and 13.0d).

    One note: When your sample code is executed in 12.0, a header is shown on the pickList for the item even though only one field is showing.
    In 12.1 this is not the case - the header will not show up if there is only a single visible field for a pickList (this change is intentional).

    If you do want the header to show, you can set showHeader:true on pickListProperties for your item

    Regards
    Isomorphic Software

    Comment

    Working...
    X