Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

  • Newbies
Posted

I have a situation where i need to count the number of leading spaces in a text field. Does anyone have thoughts on how to do this. Please keep in mind that spaces could be anywhere in the text, including trailing. I only wan to count the leading spaces.

Thanks

Posted

This seems to work, if your first character other than a space is an letter or digit. It considers punctuation (incl. #@-_., etc.) to be the same as a space however.

Let (

word1 = LeftWords ( Text_; 1 );

Position ( Text_ ; word1 ; 1 ; 1 ) - 1

)

Posted

Hi

you can try this calc too...

Length ( GetValue ( Substitute ( yourField ; Trim ( yourField ) ; ¶ ) ; 1 ) )

This counts the leading spaces whatever char is after them. ( and counts the spaces even if there aren't chars ! )

This topic is 6362 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.