Can someone help me with a saved search formula? C...
# suitescript
b
Can someone help me with a saved search formula? Currently, if I use:
Copy code
REGEXP_REPLACE(REGEXP_SUBSTR({name},': [^:]+*$'),': ','')
This will return my child name without the parent. How can I modify this to only show the parent, or the words BEFORE the colon?
s
Are you looking for the top most parent?
123 Account Parent : Account Child : Account GrandChild Do you only want 123 Account Parent?
j
Can you get the top most parent via field?
b
@suitedev yes, exactly.
t
I believe there is a field on the item record called Child Of or something similar to that. Maybe that could work?
b
@JohnnyC Not from a transaction record...I can go {item.parent}, but what I really need is {item.parent.parent} which I can't do. SO I'm trying to pull {item.parent} and remove everything before the colon, which will give me what I'm looking for.