Can you write a formula that looks at at the docum...
# ask-stanley-ai
m
Can you write a formula that looks at at the document number field and removed everything but numbers
c
AI generated answer (using internal Slack threads):
Based on the conversations, you can use the
REPLACE
and
SUBSTR
functions to manipulate the document number field. If you want to remove everything but numbers from the document number field, you can use the
REGEXP_REPLACE
function. This function replaces a sequence of characters in a string with another set of characters. However, it is important to note that this function is not available in all versions of NetSuite. Here is an example of how you can use it:
Copy code
sql
REGEXP_REPLACE({document_number}, '[^0-9]', '')
In this formula,
{document_number}
is the field you want to manipulate. The regular expression
[^0-9]
matches any character that is not a number. The
''
specifies that matched characters should be replaced with nothing, effectively removing them from the string. Please replace
{document_number}
with your actual field ID. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.854881823
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.809779108
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.808743
Please provide your feedback on this answer.