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

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

Recommended Posts

Posted

I have some records that have unwanted space in the field before the information. Is there a text calc to remove it on the left of the information?

Thanks

Posted

I tried but the field remains the same.

if it says " Main Street " it has spaces before and after.

The info in the field is always different length, I just don;'t know how to trim off the blank spaces before and after.

Thanks

Dave

Posted

Hi

1) Show all Records

2) Put the cursor into that field

3) Make a Replace by calculation and calc:

Trim ( yourField )

Now all your existing records are correct.

But to prevent other errors, put this calc into the auto-enter option of that field ( Remember to uncheck the box "Do not replace existing value of field.." )B)

Trim ( yourField )

Posted

Thank you

Now that I am looking at it there are several times that i would need to extract different amount of words from one field "alltext" to the new field called "member" between 2 symbols like the "•" symbol and the "," but the number of words in between those two symbols might be a different amount sometimes 3 words sometimes 5 words.

ex.

• the sky is falling , / return "the sky is falling"

• every good boy does fine, / return "every good boy does fine"

Posted

Calc for the new field:

Let([

start = Position ( alltext ; "•" ; 1 ; 1 ) + 1 ;

end = Position ( alltext; "," ; 1 ; 1 ) - start

];

Trim ( Middle ( alltext ; start ; end ) )

)

Posted

thank you

it works great

i have another place where the varied amount of words exists between two "," (commas) and when i use this text calculation i get a blank field

what is the difference? between this "•" and this","

what do i do if i want the words between two commas?

Posted

Let([

start = Position ( alltext ; "," ; 1 ; 1 ) + 1 ;

end = Position ( alltext; "," ; 1 ; 2 ) - start

];

Trim ( Middle ( alltext ; start ; end ) )

)

  • 1 year later...
Posted

I have a related problem, that does not seem to be solved by this example. A user can input "Tags" in a field like this:

Tag1, Tag two with more info, Tag3

The different tags are seperated by a comma.

Now, I want these tags put in a value list, and I used the function "Substitute" to replace the comma with a line break, and then base a value list on this field. This works fine, but then a number of entries begin with a whitespace like this:

Tag1

Tag 2 with more details

Tag3

If I try to substitute the whitespace with a "", then the result is:

Tag1

Tag2withmoredetails

Tag3

How do I make sure that only whitespaces coming after a comma gets removed?

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