Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7332 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello all,

i am trying to format a Text Field with a Claculation, so

Field1::Overrider becomes displayed as Field2::o v e r r i d e r

I thought this inside Field2 would do, but it doesnt;

Substitute ( Field1 ; "" ; " " )

Anyone any Idea?

Thanks a lot,

Overrider

Posted

Yopu'll need to substitute each character (upper and lowercase) in a nested function

...Substitute(Substitute(Field1, "A", "A "), "B", "B ")...

Posted

You don't specify which version you're using. If it's 6 or lower, you can use a repeating calculation and a valuelist field. If 7, a Custom Function would work.

  • 3 months later...
Posted

Does it have to be a calculation, couldn't it be an embedded applescript instead??

set aVar to cell 1

set AppleScript's text item delimiters to " "

set cell 1 to characters of aVar as text

Just an idea!!

--sd

Posted

As -Queue- says, you can use a Custom Function. Your profile states that you have version 7, so you could use this Custom Function:

// SeparateCharactersBySpace ( Field ; FieldLength )

// By Ronald W. Satz, Transpower Corporation

// 10-26-2004

// Separate Characters in Field by Space

If ( FieldLength < 1 ; // Condition

"" ; // Exit

// Character and Space are Added (but not if Character is Space)

Choose ( PatternCount ( Left ( Field ; 1 ) ; " " ; Left ( Field ; 1 ) & " " ; "" ) &

SeparateCharactersBySpace ( Right ( Field ; FieldLength - 1 ) ; FieldLength - 1 ) // Recursion

) // If

In the calculation dialog for the field, use the following calculation:

SeparateCharactersBySpace ( Field ; Length ( Field ) )

where Field is your field.

This topic is 7332 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.