简体   繁体   English

Netsuite:保存的搜索功能非常类似于Excel中的“文本到列”

[英]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. 我需要在保存的搜索中以与NS上传相同的格式导出“ NetSuite类”。 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. 您可以将CASE语句组合为“ if / then”逻辑,并使用SUBSTR()和INSTR()函数提取文本。 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. 这也可以使用正则表达式来实现,但是至少对我而言,公式更透明,因此它们是我在NetSuite中进行文本处理的首选解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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