Hi All,
This post is all about functions which are available in MS Dynamics NAV for Technical customisations.
So the First we have present is :-
1. STRSUBSTNO
Syntax :-
NewString := STRSUBSTNO(String [, Value1] ,...)
It replaces all the %1 , %2 used in message.
Example:-
STRSUBSTNO('Your balance is %1',Customer.Balance);
2.STRPOS
Syntax:-
Position := STRPOS(String, SubString)
It provides you the position of the string.
Example:-
Position := STRPOS('Navision','v');
3.STRLEN
Syntax-
Length := STRLEN(String);
It provides the length of the string .
Example :
Length := STRLEN('MSDYNAMICSNAV');
4.INCSTR
Syntax:-
NewString := INCSTR(String)
It increases the integer part in a string.
Example :
NewString := INCSTR('APU12');
Result will be APU13
5. COPYSTR
NewString := COPYSTR(String, Position[, Length])
It copies a part of string into new string.
Example :
Str := COPYSTR('Apurwa', 1, 3);
6. MAXSTRLEN
MaxLen := MAXSTRLEN(String);
It returns the maximum String Length of the Variable.
Similarly, we have STRLEN to return the Actual String Length of a variable.
7. PADSTR
Str := PADSTR('MS DYNAMICS NAV', 50, 'd');
It can be used to select a part of a string on behalf of length and add a string if we want in a part.
8. DELCHR
NewString := DELCHR(String [, Where] [, Which])
To delete a particular character from a string.
You can use where as =,>,<,<>,AND,NOT
9.CONVERTSTR
Str := CONVERTSTR('MS DYnamics Nav', 'D', 'L');
It converts some string to another if present in the orignal string.
10. UPPERCASE & LOWERCASE
It converts a string in Lower and uppercase of orignal string.
11. SELECTSTR
It retrieves the part of comma separated in a string.
Str := SELECTSTR(2, 'MS ,DYNAMICS ,NAV');
12. DELSTR & INSSTR
It deletes and inserts a part of string in orignal String.
Str := DELSTR('MS DYNAMICS NAV', 3, 8);
Str := INSSTR('MS DYNAMICS NAV', 'Anand', 8);
Thanks for giving your time to read this blog. Please do comment if you want more such post.
these are the system functions provided in MS Dynamics NAV.