I have created a custom transaction body field and...
# administration
d
I have created a custom transaction body field and I want to add a default formula value on the Validation & Defaulting tab to make it display only the actual document number from the
createdfrom
field on an invoice record. Natively, the
createdfrom
field formats as
Sales Order #SOxxxxxxxxx
. I want my custom field to give its output in the format of
SOxxxxxxxxx
. On the Validation & Defaulting tab, I checked the Formula checkbox, and in the Default Value field, I added the following formula:
Copy code
REPLACE({createdfrom}, 'Sales Order #')
From my understanding, this should remove "`Sales Order #`" from the output string. But instead, when I view an invoice record, my custom field just says
ERROR: Invalid Expression
. Why does it not render the value as desired?
t
REPLACE({createdfrom}, 'Sales Order #', '')
d
@Tim Chapman This did not work
t
SUBSTR({createdfrom}, INSTR({createdfrom}, '#') + 1)
?
v
All three options worked for me 👀
Copy code
REPLACE({createdfrom}, 'Sales Order #', '')
SUBSTR({createdfrom}, INSTR({createdfrom}, '#') + 1)
REPLACE({createdfrom}, 'Sales Order #')
d
What Type is your field?
d
@Dylan Fields Free form text
t
Do these formulas work in transaction saved search with a invoice type?