Open a data source, create a view for it and then output to the JavaScript console the contents of a named field.
To install this script, navigate to the Adobe InDesign Application Directory and paste the script file into the following folder ‘Scripts -> Scripts Panel’. The script can then be run from the Scripts panel; this is found in ‘Window -> Utilities -> Scripts’.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | var datasourceName = "ENTER NAME OF THE DATA SOURCE HERE"; var fieldToReturn = "ENTER THE NAME OF THE FIELD YOU WISH TO RETURN"; var myEasyCatalog = app.easycatalogObject; var myDS = app.easycatalogObject.datasources.item(datasourceName); var myDV = myDS.dataviews.add(); $.writeln(myDV.records.count()); for (i = 0; i < myDV.records.count();++i) { $.writeln (myDV.records.item(i).fields.item(fieldToReturn).fieldContent); } myDV.closeDataView() |