List Control Populating Columns

I am wondering if there is a way to hide columns in the list control. I would like to inline edit a list and auto-populate a field, but I do not want that field visible. Is this possible?

Hello @cwalter2,

You can choose a specific List View in the List or Library control Data Source settings.
image

To hide/show columns, modify the List View.

When the column is hidden from the List View, you can set its value using PnPjs library using this code:

fd.control('SPDataTable1').$on('change', function(changeData) {
    //update field value when new item is created
    if (changeData.type === 'add') {
        var itemID = changeData.itemId
        pnp.sp.web.lists.getByTitle("ListName").items.getById(itemID).update({
            Title: "My New Title"
        });
    }
});
1 Like