Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can this be done?

Status
Not open for further replies.

rlporter

Programmer
Sep 7, 2003
24
US
I have a field with 7 digits in it, 1234567. Is there a way, in CR9, to separate the digits and display them in different formats? Example, 123-4567 or 1234-567.

Thanks for any help.

rlporter
 
Is this a string or a numeric field?

If it's numeric, try:

picture(totext(1234567,0,""),"XXX-XXXXXXX")

Otherwise omit the totext.

-k
 
The field value is a text field, although only 7 digits, is different for each person listed. I tried this:

picture(totext{{INSTransInmates.Bkg#},0,""),"XXX-XXXX")

but got an error:

Too many arguments have been given to this function.

It then highlights the 0,"" as shown above.

If I takeout the totext I get the error, The ) is missing.

Thanks for your help.
 
Your syntax was wrong here:

picture(totext{{INSTransInmates.Bkg#},0,""),"XXX-XXXX")

The totext should have had a ( not a {

But all you need is:

picture({INSTransInmates.Bkg#},"XXX-XXXX")

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top