简体   繁体   中英

Netsuite: Saved Search Function much like “Text To Columns” in Excel

I am needing to export my NetSuite Class' in a saved search in the exact format NS needs for upload. This means I need the name and "subclass of" for the class. My best guess would be a "Text to Column" style function to achieve this.

Currently, I can call in the name (no hierarchy) field that gives me the class name ready for import. But for the subclass of, I need it to display the main class if there is one.

Example:

Column Output: Main Class:Sub Class
Expected Results: If sub class, Display "Main Class", If Not, blank

Thansk for the help!

You can combine a CASE statement for the "if/then" logic and extract the text with the SUBSTR() and INSTR() functions. You'll need to add a Formula (Text) column to your search with the formula:

CASE WHEN INSTR({class},' : ')>0 THEN SUBSTR({class},1,INSTR({class},' : ')) ELSE '' END

This could also be achieved using regular expressions but to me at least, formulas are more transparent so they are my solution of choice for text manipulation in NetSuite.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM