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

Recommended Posts

Posted

I have many clients, and often new clients are within the same area, perhaps the same street.

I'm making a script that will duplicate & replace the digits of the street, but leave the rest.

I'm using Set Variable $Leftword and insert calculated result. For the moment it works just fine... but there are times when Digits might not be the first item in the address field and its obviously removing the leftword.

Is it possible to evaluate the global variable?

Maybe my logic is off but ≥ 1 isn't working. ( I think it is just counting the items in the global variable )

Still new to filemaker.

Regards, Mike.

Posted

Well if I get your problem right here, could it be done this way:

Trim(Filter ( Lower ( theRoadAddress ) ; " abcdefghijklmnopqrstuvwxyz" ))

Returning in a field formatted as titlecase... Please observe the before the "a"

--sd

Posted

I'd be careful with that filter - because street names can contain digits as well (not to mention other characters besides plain ASCII).

How about testing for something like:

LeftWords ( Address ; 1 ) = Filter ( LeftWords ( Address ; 1 ) ; "0123456789/" )

Posted

Ended up going with isNumeric calculation

http://www.fmforums.com/forum/showtopic.php?tid/188600/

Thanks for the idea's.

Let (

[

trimmedValue = Trim( $Leftword ) ;

filteredValue = Filter( trimmedValue ; "0123456789.-" ) ;

lengthOk = Length(trimmedValue ) = Length( filteredValue ) ;

dotOccurrence = PatternCount( filteredValue ; "." ) ;

dotOk = ( dotOccurrence = 0 ) or ( dotOccurrence = 1 ) ;

minusOccurrence = PatternCount( filteredValue ; "-" ) ;

minusIndex = Position(filteredValue ; "-" ; 1 ; 1) ;

minusOk = Case(

minusOccurrence = 0 ; 1 ;

minusOccurrence = 1 and minusIndex = 1 ; 1 ;

0 )

] ;

lengthOk and dotOk and minusOk

)

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