Hey y'all, we're trying to programmatically access...
# suitescript
j
Hey y'all, we're trying to programmatically access attached files for a list of expenses; this expense list is generated by querying a saved search via suitescript. Is there any identifier we can return from a saved search to look up in the N/file Module if it has any file attachments? Also open to alternative ideas about how we can find attached files for an expense.
a
you just need a filter to join to the file
Copy code
search.createFilter({
		name: 'internalidnumber',
		join: 'file',
		operator: search.Operator.ISNOTEMPTY
	}),
j
thank you! is there any documentation on what kind of values this returns?
a
its a filter? it doesn't return a value 😄
these are the columns I also add, i think they're pretty self explanatory?
Copy code
columns: [
                    search.createColumn({
                        name: 'internalid',
                        join: 'file'
                    }),
                    search.createColumn({
                        name: 'documentsize',
                        join: 'file'
                    }),
                    search.createColumn({
                        name: 'name',
                        join: 'file'
                    })
                ]