In Sage X3, you might face various scenarios where you want to get the sub-string from an existing string. You can derive the sub-string from leftmost/rightmost direction, starting from a particular position for a given string using this tip in the blog.
This blog will help you to get the rightmost sub-string from any particular given string i.e. We can derive a new string/sub-string starting from a particular position up to the last character of an existing string.
Sage X3 provides a special function to achieve the same:
right$ (string,position)
This function is used to extract a right sub-string starting from a particular position in a character string.
Where,
string -> Original string with an alphanumeric expression
position -> Numerical integer expression for the position extraction begins.
Let’s consider following example for extracting the alphabets from the 4th letter to better understand the working of right$ function.
Snippet:
Local Char YSTR(50)
YSTR = “PINEAPPLE”
Infbox right$(YSTR, 5)
The above snippet of code will give output as “APPLE“.
Hope this helps!
About Us
Greytrix is one stop solution provider for Sage ERP and Sage CRM needs. We provide complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third party add-on development and implementation expertise.
Greytrix have some unique solutions of Sage X3’s integration with Sage CRM, Salesforce.com and Magento eCommerce. It also offers best-in-class Sage X3 customization and development services to Sage business partners, end users, and Sage PSG worldwide.
For more information on Sage X3 Integration, Migration, Development and Consulting Services, please contact us at x3@greytrix.com . We will be glad to assist you.
Also Read: