msiemens
Thank you for the quick response. It's strange because if I use this type of query for example:
db.search(where('Affected End User') == 'Lastname, Firstname')
it works on any field and it will find the right thing. Also this example:
q = db.search(where('CO Number').matches('{key}.*'.format(key=keyword)))`
works for my CO Number
field but not the Affected End User
, Description
or Summary
fields.
I'll put the JSON example below.
{
'Activity Log': [
{'Description': 'Create a new request/incident/problem/change/issue', 'Last User to Modify': 'Lastname, Firstname', 'On Date': '09-12-2019', 'Type': 'INIT'},
{'Description': 'Attach Document : ORIGINALUNZIPPEDFILENAMEHERE.pdf', 'Last User to Modify': 'Lastname, Firstname', 'On Date': '09-12-2019', 'Type': 'ATTACHTDOC'},
{'Description': "Transfer assignee from 'Lastname, Firstname' to 'Lastname, Firstname'\n", 'Last User to Modify': 'Lastname, Firstname', 'On Date': '09-12-2019', 'Type': 'TR'},
{'Description': "FIELD='description' OLD='Please order. See Attached.\n\n' NEW='Please order for hardware maintenance. See Attached.\n\nPlease use CC: 25300\n\n'\n", 'Last User to Modify': 'Lastname, Firstname', 'On Date': '09-12-2019', 'Type': 'FLD'}, {'Description': "Transfer assignee from 'Lastname, Firstname' to ''\nTransfer group from 'CTS' to 'AM'\n", 'Last User to Modify': 'Lastname, Firstname', 'On Date': '09-12-2019', 'Type': 'TR'},
{'Description': "FIELD='description' OLD='Please order for hardware maintenance. See Attached.\n\nPlease use \n\n' NEW='Please order for hardware maintenance. See Attached.\n\nPlease use CC: 25300\n\nPO should be sent to: person@email.com\n\n'\n", 'Last User to Modify': 'Lastname, Firstname', 'On Date': '09-12-2019', 'Type': 'FLD'},
{'Description': 'log a user comment', 'Last User to Modify': 'Lastname, Firstname', 'On Date': '09-12-2019', 'Type': 'LOG'},
{'Description': "Transfer assignee from '' to 'Lastname, Firstname'\n", 'Last User to Modify': 'Lastname, Firstname', 'On Date': '09-12-2019', 'Type': 'TR'}, {'Description': "Transfer group from 'am' to 'CTS'\n", 'Last User to Modify': 'Lastname, Firstname', 'On Date': '09-12-2019', 'Type': 'TR'},
{'Description': "Transfer assignee from 'Lastname, Firstname' to ''\nTransfer group from 'CTS' to 'AM'\n", 'Last User to Modify': 'Lastname, Firstname', 'On Date': '10-15-2019', 'Type': 'TR'},
{'Description': "Status changed from 'Open' to 'Closed'", 'Last User to Modify': 'Lastname, Firstname', 'On Date': '10-15-2019', 'Type': 'CL'}
],
'Affected End User': 'Lastname, Firstname',
'Attachments': [
{'File Name': 'AGZIPPEDFILENAMEHERE.pdf.gz', 'Original Name': 'ORIGINALUNZIPPEDFILENAMEHERE.pdf', 'Relative File Path': 'rep_folder', 'Repository': 'doc_rep'}
],
'CO Number': '12345678',
'Comments': [
{'Analyst': 'Lastname, Firstname', 'Comment': 'INFO ABOUT ORDER \n\n W.AREPC3- View and Edit Requisition Line Item\n3 Year Premium Care Plan with 1.0000\nEA 1111.0000 USD\n1111.0000 \n\n\n\n \nRequisition Line Totals\n\n\nTotal Quantity: \n1.0000 \n\nTotal Cost: \n1111.00 USD \n\nNumber of Lines: \n1 \n \n', 'Comment Date': '09-12-2019', 'Type': 'LOG'}
],
'Description': 'There will be much longer description of the order here that sometimes will include \n\n and \t',
'Open Date': '09-12-19',
'Summary': 'Will be a short description here.'
}