Oct-07-2019, 08:45 PM
(Oct-07-2019, 05:44 PM)ichabod801 Wrote: So if 'Classification' is in the email, you want to split by that, otherwise split by 'Sent by BlackBerry Work'? In that case it's just:
if "Classification:" in filtered_artifacts_item_1_0: splitresponse__response_value = filtered_artifacts_item_1_0[0].split('Classification:') else: splitresponse__response_value = filtered_artifacts_item_1_0[0].split("Sent with BlackBerry Work")
Thank you, it accepted the syntax, still getting a NonType error but I'm going to have a fresh message sent to confirm it's just not ingesting a blank form.
Do you see any issues with my adding a third split? Also, I added [0].strip() to the end of each splitresponse as I want it to strip out the remainder of the email body. Correct?
if "Classification:" in filtered_artifacts_item_1_0: splitresponse__response_value = filtered_artifacts_item_1_0[0].split('Classification:')[0].strip() else: splitresponse__response_value = filtered_artifacts_item_1_0[0].split('Sent with BlackBerry Work')[0].strip() splitresponse__event_id = filtered_artifacts_item_1_0[0].split('*****************')[1].strip()