Solved

create a substring from string in acumatica report

  • 20 April 2023
  • 3 replies
  • 465 views

Userlevel 3
Badge

Hi,

I need to trim a part from the string in my report field.

This is my report I need to show ST2-MATERIAL HANDLING   -GST value as MATERIAL HANDLING

and ST2-AGRICULTURE PNEUMATI   -GRN as AGRICULTURE PNEUMATI

 

How can i do from the report designer in acumatica

icon

Best answer by hkabiri 20 April 2023, 18:53

View original

3 replies

Userlevel 6
Badge +5

@jeewanishalika20 Check if you can use Substring( str, start, length ) function to achieve this. Since the String can be different in different documents, then you have to find the first occurrence of dash (-) InStr( str, findStr ) and also last one InStrRev( str, findStr ) so get what in between the two using the substring.

https://help.acumatica.com/(W(3))/Help?ScreenId=ShowWiki&pageid=00a69dbb-c06b-4ce4-8b29-e86ee0e8ed47

Userlevel 3
Badge

Hi @hkabiri ,

I try it.

ST2-MATERIAL HANDLING-GST

I used InStr( ‘ST2-MATERIAL HANDLING-GST’, ‘-’ ) to find the dash index and it return 3.

But when I used the database column for ST2-MATERIAL HANDLING-GST it return -1.

InStr( ‘[INItemClass.ItemClassCD], ‘-’ ) when I use it it return -1.But the column value is ST2-MATERIAL HANDLING-GST .

Do you have any idea about that.

 

Hi @hkabiri ,

I try it.

ST2-MATERIAL HANDLING-GST

I used InStr( ‘ST2-MATERIAL HANDLING-GST’, ‘-’ ) to find the dash index and it return 3.

But when I used the database column for ST2-MATERIAL HANDLING-GST it return -1.

InStr( ‘[INItemClass.ItemClassCD], ‘-’ ) when I use it it return -1.But the column value is ST2-MATERIAL HANDLING-GST .

Do you have any idea about that.

 

Hi @jeewanishalika20 , did u manage to find the solution? because iam having same issue right now. if you can share it would be great 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved