split character ‘-‘

hello, im newbie use netsuite . I have account expense display

6104010003 OPERATING EXPENSES : OPERATION EXPENSES : OPERATION – TRAVEL EXPENSE : OPERATION – TRAVEL EXPENSE : OPR. – TRAVEL : TRANSPORTATION

i will display in advance pdf to be

OPERATION – TRAVEL EXPENSE : OPR. – TRAVEL : TRANSPORTATION

please help me how script that?

Rookie Asked on October 19, 2021 in Saved Searches.

Hello, I have a solution that should work in a saved search if the account structure is the same for all the accounts you are trying to pull, it will always dig into the third “:” set and display everything after it. I am going to give you the formula for this example and then give you the one you should replace your field with. making a Formula(Text) and putting the following into the formula

SUBSTR(SUBSTR(SUBSTR(‘6104010003 OPERATING EXPENSES : OPERATION EXPENSES : OPERATION – TRAVEL EXPENSE : OPERATION – TRAVEL EXPENSE : OPR. – TRAVEL : TRANSPORTATION’,INSTR(‘6104010003 OPERATING EXPENSES : OPERATION EXPENSES : OPERATION – TRAVEL EXPENSE : OPERATION – TRAVEL EXPENSE : OPR. – TRAVEL : TRANSPORTATION’,’:’)+2),INSTR(SUBSTR(‘6104010003 OPERATING EXPENSES : OPERATION EXPENSES : OPERATION – TRAVEL EXPENSE : OPERATION – TRAVEL EXPENSE : OPR. – TRAVEL : TRANSPORTATION’,INSTR(‘6104010003 OPERATING EXPENSES : OPERATION EXPENSES : OPERATION – TRAVEL EXPENSE : OPERATION – TRAVEL EXPENSE : OPR. – TRAVEL : TRANSPORTATION’,’:’)+2),’:’)+2),INSTR(SUBSTR(SUBSTR(‘6104010003 OPERATING EXPENSES : OPERATION EXPENSES : OPERATION – TRAVEL EXPENSE : OPERATION – TRAVEL EXPENSE : OPR. – TRAVEL : TRANSPORTATION’,INSTR(‘6104010003 OPERATING EXPENSES : OPERATION EXPENSES : OPERATION – TRAVEL EXPENSE : OPERATION – TRAVEL EXPENSE : OPR. – TRAVEL : TRANSPORTATION’,’:’)+2),INSTR(SUBSTR(‘6104010003 OPERATING EXPENSES : OPERATION EXPENSES : OPERATION – TRAVEL EXPENSE : OPERATION – TRAVEL EXPENSE : OPR. – TRAVEL : TRANSPORTATION’,INSTR(‘6104010003 OPERATING EXPENSES : OPERATION EXPENSES : OPERATION – TRAVEL EXPENSE : OPERATION – TRAVEL EXPENSE : OPR. – TRAVEL : TRANSPORTATION’,’:’)+2),’:’)+2),’:’)+2)
 
will get you
OPERATION – TRAVEL EXPENSE : OPR. – TRAVEL : TRANSPORTATION
 
 
you will want to use the following formula(text) and replace {account}
with the field, you are trying to pull from.
 
SUBSTR(SUBSTR(SUBSTR({ACCOUNT},INSTR({ACCOUNT},’:’)+2),INSTR(SUBSTR({ACCOUNT},INSTR({ACCOUNT},’:’)+2),’:’)+2),INSTR(SUBSTR(SUBSTR({ACCOUNT},INSTR({ACCOUNT},’:’)+2),INSTR(SUBSTR({ACCOUNT},INSTR({ACCOUNT},’:’)+2),’:’)+2),’:’)+2)
 
 
This may not work completely as intended but its as close as I could get without knowing all the accounts
You could always add a case statement around this so you can determine when it should go build that
on January 25, 2022.
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Limebox   Become a Sponsor   Become a Sponsor