Jump to content

marxster

Members
  • Posts

    7
  • Joined

  • Last visited

marxster's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Got everything to work. Thanks everyone for the helpful advice.
  2. No, my fields are not auto-enter, but I have to import records from a webform. If people enter spaces, I end up with spaces in my database. Anyway, the solution I mentioned in my last post works on all newly created records but not on existing records.
  3. Actually, I just realized that it works for those records that I create, however, it doesn't remove the spaces from existing records. How do I achieve that?
  4. I got it to work. See below. Thank you for the help. Let( [ // Determine value of original string with ALL whitespace removed. t2 = Substitute( First Name; [ " "; "" ]; [ " "; "" ]; [ " "; "" ]; [ "¶"; "" ] ); // Determine position of first non-ws character in original string. first_char = Position( First Name; Left( t2; 1 ); 0; 1 ); // Determine position of last non-ww character in original string. last_char = Position( First Name; Right( t2; 1 ); Length( First Name ); -1 ) ]; // If any non-whitespace characters exist return appropriate // middle portion of original text. Case( first_char; Middle( TextFormatRemove( First Name ); first_char; last_char - first_char + 1 ) ) )
  5. Bruce, I'm not a filemaker developer, so these calculations are Chinese to me. So, from your post I gather that I'm to insert TextRemoveFormat into the other calculation, right?
  6. Actually, I now found a better calculation that not only gets rid of spaces but also of carriage returns and tabs (see below).The thing is I also want to remove formatting. The text field is "Last Name". Before, when I wasn't using the space removal calculation I had only TextFormatRemove ( Last Name ). So how do I go about making sure that the latter and the below work together? Let( [ // Determine value of original string with ALL whitespace removed. t2 = Substitute( text; [ " "; "" ]; [ " "; "" ]; [ " "; "" ]; [ "¶"; "" ] ); // Determine position of first non-ws character in original string. first_char = Position( text; Left( t2; 1 ); 0; 1 ); // Determine position of last non-ww character in original string. last_char = Position( text; Right( t2; 1 ); Length( text ); -1 ) ]; // If any non-whitespace characters exist return appropriate // middle portion of original text. Case( first_char; Middle( text; first_char; last_char - first_char + 1 ) ) )
  7. LaRetta I have a question. I'm trying to remove spaces before and after the Last Name and First Name. Your suggestion works fine, however, I had already a TextFormatRemove function on those same fields. When I remove the TextFormatRemove, your suggestion works fine, spaces are removed, however, when I put the TextFormatRemove back in, with the TrimAll function, it either replaces text with other text or writes a 0 instead. How do I make sure that both functions work fine at the same time? Thanks. Marco
×
×
  • Create New...

Important Information

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