File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
docs/learn/rossum-formulas Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,24 @@ Returns line item number (indexed from 0):
123
123
field._index
124
124
```
125
125
126
+ ### Get email body and subject
127
+
128
+ Search PO number (e.g. ` PO111 ` ) in the email subject:
129
+
130
+ ``` py
131
+ email_subject = getattr (annotation.email, " subject" , " " )
132
+ if match := re.search(r " ( PO111) " , email_subject, re.IGNORECASE ):
133
+ match.group(1 )
134
+ ```
135
+
136
+ Search PO number (e.g. ` PO222 ` ) in the email body:
137
+
138
+ ``` py
139
+ email_body_text_plain = getattr (annotation.email, " body_text_plain" , " " )
140
+ if match := re.search(r " ( PO222) " , email_body_text_plain, re.IGNORECASE ):
141
+ match.group(1 )
142
+ ```
143
+
126
144
### Normalize field value
127
145
128
146
Remove non-alphanumeric characters (except "-" and "\_ "):
You can’t perform that action at this time.
0 commit comments