Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Tuesday, October 14, 2014

String Handling in AX

Hi,

    str 100     mailBody = 'Mohamed Alfasith IsmailSuban';
    if(strScan(mailBody,'Suban',1,strLen(mailBody)))
// Checks the presence of the string
       print strreplace(mailBody,'Suban',"Mohamed");
//Replaces the substring in main string...
 
//Delete the first letter in AX
strDel("Dynamic AX",1,1); // it retuns "ynamic"

subStr("Alfasith",3,5); //Returns the string 'fasit'.
strUpr("Alfaith"); // Returns the string ALFASITH
strRTrim("*AX*"); //Returns "*AX". removes the space in right end
strLTrim("*AX*"); //Returns " AX*". removes the space in left end

str mytxt = "Mohamed\nAlfasith\nIsmail"; // here \n is the new line escape sequence
print strLine(mytxt,1); // this prints only Mohamed

strLen("Fasith"); // returns 6

strRep('Ala',5); //  returns AlaAlaAlaAlaAla

Regards

No comments:

Post a Comment

How find size of recordsortedlist in D365/AX 2012

Hi, This is the continuity of the previous article where we are now getting the size of recordsortedlist . if(recordsortedlist.len() >1) ...