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

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

Recommended Posts

  • Newbies
Posted

I apologize if this is in the wrong forum.

I'm using a search script and it won't work with email addresses.  I have found information about the @ being a wildcard, so it won't work when searching for emails.  I understand why, I just don't understand how to modify what I have to make it work.  Here is my script.  Any help would be appreciated.  Be nice, I'm learning.

I've attached a screen capture here.

Thanks for your anticipated help.

screen cap.jpg

Posted

You need to escape the @ character. Either enter it as \@, or make your script do it for you by:

Set Field [ Students::Email ; Substitute ( Search::Search Field ; "@" ; "\@" ) ]

--
P.S. Next time please post your script as code, not as a picture.

Posted

Or you could set indexing to "unicode" in the field definition (thanks to JFS for the reminder...)

This is especially helpful when such an email field is accessible in search mode for users...

Posted
27 minutes ago, Lem Alpha said:

Or you could set indexing to "unicode" in the field definition (thanks to JFS for the reminder...)

This is especially helpful when such an email field is accessible in search mode for users...

I would avoid changing the field indexing. If you do that, then it also makes it case sensitive, which can be confusing to users as well.

Posted

True. But I have seldom seen emails encoded with upper case, so I think the benefits of users being able to search for emails using @ are greater.
And just making this field an auto-entered calc Lower ( Self ) would prevent indexing upper case chars.

I was specifically speaking of users manually searching for emails, of course.

Posted
47 minutes ago, Lem Alpha said:

Or you could set indexing to "unicode" in the field definition

That may have unintended consequences: for example, searching for a@b will also find "axb". IOW, @ is still a wild card.

Posted

This is also a good remark.

In my case of making it easier for users to search for emails, it was never an issue because when someone puts in the @ it means they put in a complete address, so there shouldn't be any parasitic results.

But of course, for such a scripted search, it would not be bulletproof then.

Thanks for pointing out these caveats, both of you.

Posted

If you really want an exact match, I have used this before:

"==" & Quote ( $email_search )

That specifies an exact match and takes care of quoting the search term.

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