The data lookup button allows users to populate attribute values from an external source, for example, a PIM (Product Information Management) or Collections Managment system.
The rest of this help page covers using a simple plug-in that looks up data from a tab-delimited text file located on your Asset Bank server. We are happy to provide consultancy to help you configure this – please note that this work would be chargeable i.e. it is not included in our standard support.
The following settings are available when creating and editing the attribute:
- Label - Text to display on the button itself.
- Help text - Help text available next to the data lookup button.
- Plugin class - The name of the class that performs the data lookup. To read from a tab-delimited text file, use the value com.bright.assetbank.attribute.plugin.DataLookupFromTextFilePlugin.
- Attributes for parameters (comma separated) - The IDs of attributes which are used to lookup rows in the text file. The ID of an attribute can be found by looking at the URL for editing the attribute on the Attributes page of the Admin section. The ID for an attribute follows the 'attributeId=' part of the URL.
For example, if you want to use the Title as the lookup value, then the setting is 3.
If you want to use the ID of the asset and the Original Filename then the setting is 2,6. In this case, both bits of information would need to be comma separated within the first column of the .txt file (e.g. "10,image.png")
In addition to these settings, the textfile-path setting in the DataLookupFromTextFileSettings.properties (in the WEB-INF/classes folder) file must point to the tab-delimited file located on the server. (Note, you may have to create this text file if it does not yet exist.) For example, the contents of this file could be:
"textfile-path=/var/lib/tomcat/webapps/asset-bank/WEB-INF/classes/DataLookupFile.txt" on a Linux-based server
"textfile-path=C:\\tomcat\\webapps\\asset-bank\\WEB-INF\\classes\\DataLookupFile.txt" on a Windows server.
Please note that the path must be absolute. It is also worth considering whether this file should be accessed remotely, for example by FTP or SCP, so that it can be updated regularly.
"textfile-path=/var/lib/tomcat/webapps/asset-bank/WEB-INF/classes/DataLookupFile.txt" on a Linux-based server
"textfile-path=C:\\tomcat\\webapps\\asset-bank\\WEB-INF\\classes\\DataLookupFile.txt" on a Windows server.
Please note that the path must be absolute. It is also worth considering whether this file should be accessed remotely, for example by FTP or SCP, so that it can be updated regularly.
An example file looks like this:
Title Description Keywords
Lookup title New description New keywords
If the 'Attributes for parameters' setting is 3 (the default title attribute) and an asset has the title "Lookup title", then clicking the data lookup button will result in the description changing to "New description" and the keywords to "New keywords".
Note that any columns where the header name does not match the label of an attribute are ignored.
Please note: It is only possible specify a single text file and therefore only one data lookup button can be configured at a time.
Comments
0 comments
Please sign in to leave a comment.