Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The "Field to Perform Lookup With" Setting Does Not Work #2

Open
AustinTSchaffer opened this issue Feb 20, 2020 · 0 comments
Open

The "Field to Perform Lookup With" Setting Does Not Work #2

AustinTSchaffer opened this issue Feb 20, 2020 · 0 comments

Comments

@AustinTSchaffer
Copy link
Contributor

The "Field to Perform Lookup With" setting does not work as expected.

The setting has a default value of "{default}". If the setting is set to this value, the code will extract the field description from DataMapping.BarcodeFieldMapping, which it will later use when to provide barcodes to the Alma API. If the value of the setting is changed, the code will not extract any field description, so it will not be able to provide barcodes to the Alma API.

if settings.FieldToPerformLookupWith:lower() == "{default}" then

Either (a) the setting should be removed or (b) the code should allow for non-default field descriptions within that setting. For either case, we should review the README to be sure that the program flow is clear. For case (b), this would look something like the following:

-- Find the field to perform lookup with
if settings.FieldToPerformLookupWith:lower() == "{default}" then
  settings.FieldToPerformLookupWith = DataMapping.BarcodeFieldMapping[product];
end

settings.FieldToPerformLookupWith = Utility.StringSplit(".", settings.FieldToPerformLookupWith);
settings.FieldToPerformLookupWith[1] = Utility.Trim(settings.FieldToPerformLookupWith[1]);
settings.FieldToPerformLookupWith[2] = Utility.Trim(settings.FieldToPerformLookupWith[2]);
log:InfoFormat("Field to Perform Lookup With is {0}.{1}", settings.FieldToPerformLookupWith[1], settings.FieldToPerformLookupWith[2]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant