my data is storing in the data base in the formate of customer number :"F123" i have serch filter when i search with F123 it is returing the related data but now if i search with customer number with padding (0) like "F000123" it shoud return the data whic have returen for "F123",
the customer number is passing to stored proc and getting the out put so my queery is before sending input to the stored proc i need to remove the padded values then need to send to stored proc please me with solution
so how can i remove the padded (0) from the value where i am searching
Discussion posts and replies are publicly visible
Assuming your Customer Number format always leads with a single aplha character with remainder as numerics you can do this:
a!localVariables( local!character1: fn!left(ri!customerNumber, 1), local!remainingCharacters: fn!right( ri!customerNumber, fn!len(ri!customerNumber) - 1 ), fn!concat( local!character1, fn!tointeger(local!remainingCharacters) ) )
I also suggest you familiarize yourself with the extract() function in case that helps you here. Like if the value is always preceded by the literal text "F000" (you didn't clarify how static / dynamic this is, so it's hard to tell). Otherwise you could just call tointeger() over the entire value and re-add the "F" preceding character after you extract the integral value.
actal customer number is "F1234" have certain records related for that passed as input to stored proc and i get related data,, if i search like "F0001234" it should pass input to stored proc as "F1234" and have to get data related to it the above qury is removing F also so before passing to the stored proct what ever the customer number in database it should be same and need to be removed the extra padded charecters
it is static value getting from stored proc as i mentioned above reply it should be in that way before sending input to stored proc the value whic is there is in db should be in same foremate and the padded values should be removed befor sending to stored proc
The functions I named above should be able to be used to convert to the correct value within Appian, either way. If you're having different results then you'll need to provide more details relating to what you're trying / have tried and found not to work as you expect.