Jun 21, 2010 #1 dev1212 Programmer May 11, 2010 117 US Hi, I have a ticket number field which is string. I want to display the last 4 digits only as xxxxxx5789. I forgot how to format it. Please reply.. Thanks
Hi, I have a ticket number field which is string. I want to display the last 4 digits only as xxxxxx5789. I forgot how to format it. Please reply.. Thanks
Jun 21, 2010 #2 lbass Technical User Feb 9, 2002 32,816 US Try: "xxxxxx"+right({table.string},4) -LB Upvote 0 Downvote
Jun 21, 2010 Thread starter #3 dev1212 Programmer May 11, 2010 117 US I tried it already but the thing is the length of the string is not constant. Sometimes the length of string is 10 sometimes 15 ... Any other idea plz.. Upvote 0 Downvote
I tried it already but the thing is the length of the string is not constant. Sometimes the length of string is 10 sometimes 15 ... Any other idea plz..
Jun 21, 2010 #4 lbass Technical User Feb 9, 2002 32,816 US And then what would you want to happen? Do you want them all the same length? Or do you want to maintain the length? -LB Upvote 0 Downvote
And then what would you want to happen? Do you want them all the same length? Or do you want to maintain the length? -LB
Jun 21, 2010 Thread starter #5 dev1212 Programmer May 11, 2010 117 US The values are 'AD789733845789' 'XX344237777' '4DWE87393DERTXTQ22' So if i append 6 x's like you suggested 'xxxxxx'&Right({Customer.Number},4) it will add 6 x's with last 4 digits. As you can see the lengths of the string are different. I need all 'x' with last 4 digits as 'xxxxxxxxxx5789' 'xxxxxxx7777' 'xxxxxxxxxxxxxxTQ22' Thanks.. I appreciate your reply. Upvote 0 Downvote
The values are 'AD789733845789' 'XX344237777' '4DWE87393DERTXTQ22' So if i append 6 x's like you suggested 'xxxxxx'&Right({Customer.Number},4) it will add 6 x's with last 4 digits. As you can see the lengths of the string are different. I need all 'x' with last 4 digits as 'xxxxxxxxxx5789' 'xxxxxxx7777' 'xxxxxxxxxxxxxxTQ22' Thanks.. I appreciate your reply.
Jun 21, 2010 1 #6 lbass Technical User Feb 9, 2002 32,816 US Change the formula to: replicatestring("x",len({table.string})-4)+right({table.string},4) -LB Upvote 0 Downvote
Jun 21, 2010 Thread starter #7 dev1212 Programmer May 11, 2010 117 US Thanks.. dats exactly what i was looking for. Upvote 0 Downvote