Options

how to find numbers from alphanumeric field

rishi_smhsrishi_smhs Member Posts: 13
edited 2011-11-08 in NAV Three Tier
hiii,
can anyone tell me that how to find numbers from alphanumeric field in navision.

Comments

  • Options
    deV.chdeV.ch Member Posts: 543
    If you want to test if a specific position in a Text Variable or Field is Numeric then use this:
    IsNumeric := EVALUATE(TempInt, YourNAVField[Position]);
    

    If you want to know if the whole field is numeric then just leave away the [Position]
  • Options
    mohana_cse06mohana_cse06 Member Posts: 5,503
    you can try
    test := 'abcd12fs451af44';
    newtest := DELCHR(test,'=',DELCHR(test,'=','1|2|3|4|5|6|7|8|9|0'));
    
  • Options
    krikikriki Member, Moderator Posts: 9,090
    you can try
    test := 'abcd12fs451af44';
    newtest := DELCHR(test,'=',DELCHR(test,'=','1|2|3|4|5|6|7|8|9|0'));
    
    Don't use the | in the string. It means that you also delete that character in the inner DELCHR and thus NOT in the outer DELCHR.

    Use this:
    test := 'a|bc|d12|fs451af44';
    newtest := DELCHR(test,'=',DELCHR(test,'=','1234567890'));
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Options
    mohana_cse06mohana_cse06 Member Posts: 5,503
    kriki wrote:
    you can try
    test := 'abcd12fs451af44';
    newtest := DELCHR(test,'=',DELCHR(test,'=','1|2|3|4|5|6|7|8|9|0'));
    
    Don't use the | in the string. It means that you also delete that character in the inner DELCHR and thus NOT in the outer DELCHR.

    Use this:
    test := 'a|bc|d12|fs451af44';
    newtest := DELCHR(test,'=',DELCHR(test,'=','1234567890'));
    

    Thanks for correcting :thumbsup:
Sign In or Register to comment.