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 3640 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a lot of records which end in either

.org/  .com/  .us/  .net/ 

 

How can I write a statement that determines if any of those are present?

 

The way I have been doing it is to write 4 separate statements.

I am asking how to write it correctly if there are a lot of different texts strings that I am trying to detect.

 

In my own words

It would be something like this

 

If

my field  ends with ".org/ " ".com/ "" .us/ " " .net/ " 

Perform script

 

But they are not always 4 characters. Thats the problem.

 

PLease help if this is not hard for you.

Thanks

 

Posted

The script is supposed to find the presence of .org/ .us/ .net/ .com/ 

if the end of the text in my text field ends with one of those.

 

If that is the case I want to play a script I already use.

If that is not the case to do nothing.

Posted

I am asking how to write it correctly if there are a lot of different texts strings

 

Do you mean: lots of strings to test, or to test against? If the latter, then you could try

Let ( [
  allowedDomains = "org¶com¶us¶net" ;
  thisDomain = Substitute ( YourTable::yourSourceField ; [ "." ; ¶ ] ; [ "/" ; "" ] ) ;
  thisDomain = RightValues ( thisDomain ; 1 ) 
  ] ;
  not IsEmpty ( FilterValues ( thisDomain ; allowedDomains ) )
)

For just four strings, that not really progress in comparison to PatternCount(); but instead of hardcoding a list of allowed domains, you could reference e.g. a field with such a list, and extend that list without having to modify the calculation.

Posted (edited)

The script is supposed to find the presence of .org/ .us/ .net/ .com/ 

if the end of the text in my text field ends with one of those.

 

If that is the case I want to play a script I already use.

If that is not the case to do nothing.

That was the purpose of my question - What will the script do as a result of the present of these file extensions?

 

ADDED:

 

Copy the script so that we can see what your intent will be.

Edited by Lee Smith
ADDED
Posted

The script just copies the contents of one field to another

 

If those Items are present at the end of the text string

 

The script "Copy to web address"

Is

Set field  generic list gather::web address Copy

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