Script settings Scripting Extension only
Scripting Extension only
Script settings allow a user to change settings without needing to touch the code. A script can ask for Tables, Fields, Views, and other custom user inputs in this way.
This example prints all of the cells that are in both the Field and View given.
Example
// Click the "gear" icon in the top right to view settingslet config = input.config({title: 'Your script with settings',description: 'A script that uses settings',items: [input.config.table('selectedTable', {label: 'Table to use',description: 'Pick any table in this base!',}),input.config.field('selectedField', {label: 'Field inside the above table',parentTable: 'selectedTable',}),input.config.view('selectedView', {label: 'View inside the above table',parentTable: 'selectedTable',})]});// The returned config object will contain the settings selected by the userlet selectedField = config.selectedField;let selectedView = config.selectedView;// Get the records (sorted the same as in the view)let query = await selectedView.selectRecordsAsync({// Only get the field specified by the userfields: [selectedField]});// Print field from each recordfor (let record of query.records) {let cellString = record.getCellValueAsString(selectedField)output.text(cellString)}