I need to extract a $ value from a string. Sometimes the string does not have a $ value in it. How do I exclude these strings? I am getting an error message "Start position is less than 1 or not an integer.
Formula for @TestforValue (look for $ to find value): "$" in {sp.DESC}
Formula to display value:
If {@TestForValue} = true then
numbervar startpos1;
numbervar endpos1;
numbervar allchar1;
stringvar val1;
startpos1:=InStrRev ({sp.DESC},"$"
endpos1:=InStrRev ({sp.DESC},"." );
allchar1:=endpos1-startpos1+3;
val1:= mid({sp.DESC},startpos1,allchar1);
Also - I want to make the outcome a number. I am getting error messages when I use toNumber(giftval1)
TIA
Formula for @TestforValue (look for $ to find value): "$" in {sp.DESC}
Formula to display value:
If {@TestForValue} = true then
numbervar startpos1;
numbervar endpos1;
numbervar allchar1;
stringvar val1;
startpos1:=InStrRev ({sp.DESC},"$"
endpos1:=InStrRev ({sp.DESC},"." );
allchar1:=endpos1-startpos1+3;
val1:= mid({sp.DESC},startpos1,allchar1);
Also - I want to make the outcome a number. I am getting error messages when I use toNumber(giftval1)
TIA