We have a variable n: code[20]
where n := 'SCI007.001';
Need to extract the only SCI007 i.e before the seperator (dot)
Any suggestions ?
We have a variable n: code[20]
where n := 'SCI007.001';
Need to extract the only SCI007 i.e before the seperator (dot)
Any suggestions ?
You can try this:
trigger OnRun()
var
mytext: Text;
mynewtext: text;
begin
mytext := 'SCI007.001';
mynewtext := copystr(mytext, 1, (StrPos(mytext, '.') - 1));
Message(mynewtext);
end;
Use this docs.microsoft.com/.../text-strpos-method
Then you know the position and you can copystr
Sohail Ahmed
2,655
Mansi Soni
1,574
YUN ZHU
1,453
Super User 2025 Season 1