Hi, I have created a transaction saved search with columns, document number, transaction type, and account name. I want to pull the account name without any hierarchy (no parent) in the account name. Please can someone let me know how to do it?
k
kennkerp
06/19/2023, 8:14 PM
Formula (text) = regexp_replace({account},regexp_substr({account},'^(.+?)[0-9]+{2}'),'')
n
NS User
06/19/2023, 8:53 PM
Thanks, Kenn. I just want to pull the name of the account, not parent. Example: 211100 Accounts Payable - NEW : Accounts Payable - Suppliers. In this, I just want to pull “Accounts Payable - Suppliers”. Could you please let me know how to do it? If I use Account Fields->Name, it is already giving me the same result as your formula, but it is not pulling just the name.
NS User
06/19/2023, 9:19 PM
Hi Kenn, the below formula worked for me, but thank you very much for your immediate response! CASE WHEN INSTR ( {account}, ‘:’, -1) > 0 THEN SUBSTR ( {account}, INSTR ( {account}, ‘:’, -1) +2) ELSE {account} END
s
Suitestallion
06/20/2023, 4:08 PM
I think you might be able achieve the same with checking the box “show only last sub account” under set preferences
n
NS User
06/20/2023, 5:33 PM
Good to know, but set preference is for a specific user. It needs to be enabled for each user, so it will be available when they access the saved search.