hi navision experts,
i need your help!
I have a string like that 123456789 a want to creat e variable with 2 first nambers "12", and another variable with 4 number countin from the end "6789" is that imposible on navision
or
if my string start with 12 else last 4 nomber should be 0000
thnx
0
Comments
you can use STRLEN & COPYSTR functions.
Technical Consultant, MS Dynamics NAV
Click on your help menu, and select "C/SIDE Reference Guide". This opens the C/SIDE Reference Guide, which has all the syntax help that you need. Go to the Search tab, type in STRPOS and click "List Topics". Now you will see the command in the lower left hand box. Put your cursor on the topic and click on "Display". Now you will see the help topic for this command in the right hand side of the C/SIDE Reference Guide. It even comes with a code sample. Do the same with STRLEN, and any other command you want to know more about.
In the C/AL editor, press F5. On the left hand side scroll down to where it says SYSTEM. In the middle, select String, and this will display all available commands for Text variables. Type in any of these commands into the C/SIDE Reference Guide to learn about them. There are tons of code samples in there that should help you figure this kind of stuff out.
In the beginning you don't know what all those commands are for. Don't worry neither did any of us when we first started. That's why you should read about all of them, and learn what they stand for. Good luck
RIS Plus, LLC
MVP - Business Apps
RIS Plus, LLC
MVP - Business Apps
shifra := "No.";
teksti := 'pozicioni:';
substring := '2700';
pos := STRPOS(shifra, substring);
MESSAGE(teksti, pos);
and i mesagebox show me just teksti variable "position:"
wher is my mistatake
FirstPart := string[1] + String[2] ;
Your mistake is in teksti := 'pozicioni:';
IT should be teksti := 'pozicioni: %1';
and
MESSAGE(STRSUBSTNO(teksti, pos));