Skip to main content
Solved

create a substring from string in acumatica report


Forum|alt.badge.img

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

Best answer by hkabiri

@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

View original
Did this topic help you find an answer to your question?

3 replies

hkabiri
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Support Team
  • 224 replies
  • Answer
  • April 20, 2023

@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


Forum|alt.badge.img

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.

 


Forum|alt.badge.img
  • Freshman II
  • 11 replies
  • October 25, 2023
jeewanishalika20 wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings