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

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

Recommended Posts

Posted

I have hundreds of [color:red]this is an item descriptions that need to port to the web with an alternative character for the space. So I need them to read [color:red]this_is_the_item or [color:red]this-is-the-item etc. I know there is a simple way to do this and for some reason I am just not getting it.

Posted (edited)

Calculation (result is text) with: Substitute ( yourTextField ; " " ; "_" )

You can then use the calculation itself -- or -- use this calculation in a script to set the field and physically replace the spaces (I suggest you set another field and leave the original in tact). Script might be:

Set Field [ newTextField ; Substitute ( yourTextField ; " " ; "_" ) ]

You would use Replace Field Contents (which would run through all found records) or use a loop such as:

Go To Record/Request/Page [ first ]

Loop

Set Field ... ya da ya da

Go To Record/Request/Page [ Exit after last ; next ]

End Loop

Edited by Guest
Added scripted option
Posted

I've seen self-proclaimed Advanced users ask what a Case() statement needs. I can only go by the question asked. If Substitute() is escaping his mind at the moment, might not how to loop also be?

What, Daniele ... you are critiquing my simple answer now? Bored, huh? I can suggest alternate activities.

Posted

Thanks for the great advice LaRetta. Substitute was my answer... duh. [color:green]Now if I could only remember what to use if a field contains a certain digit, how can I get the result field to be something based on it (LOL).

Raybaudi... did it ever occur to you that I accidentally checked advanced since I use advanced as the application? I develop in-house and I am in no way advanced. I love sarcasm as much as the next guy but I think that was just plain old mean. Maybe it's your English. I have changed my profile to Intermediate until I stop posting on this forum with questions and not answers.

Posted (edited)

Now if I could only remember what to use if a field contains a certain digit, how can I get the result field to be something based on it (LOL).

Joke or serious? If serious you might consider something along the lines of:

Case (

PatternCount ( yourField ; theDigit ) ; yourResult )

)

If that digit is in a text field, wrap it with quotes, ie, "06" etc.

Edited by Guest
Posted

Okay, a joke. I'm quite a literal person and I just didn't get it! Then, about my suggestion? Never mind. :content:

LaRetta :wink2:

Posted

I've seen self-proclaimed Advanced users ask what a Case() statement needs. I can only go by the question asked. If Substitute() is escaping his mind at the moment, might not how to loop also be?

What, Daniele ... you are critiquing my simple answer now? Bored, huh? I can suggest alternate activities.

Trying to be tongue and cheek about your answer. And yes, I have had loop escape my mind at times. Since I only do this 27.834% of the time, I can drop off knowledge if the box get's put away for a couple of weeks. Thanks for your help, now only if I can solve my Server Certificate Expiration issue...

Posted

Raybaudi... did it ever occur to you that I accidentally checked advanced since I use advanced as the application?

Ah! ...I have been wondering how late arrivers, who havn't shown up in other forums/debates either - immediately would know the colour of their karate belt in filemaker - good point indeed! I thought it was their excel skills which apparently should be supposed qualifying?

--sd

Posted

I can't even say I am intermediate until I get knocked down again but I'll keep trying. I developed my in-house application suite back in FMP 6, but with all the great new bells and whistles, my skill level certainly has not kept up with the forward thinking developments in FMP. For instance, I have a database that uses a calendar calculation field now, I recall it replaced a script that was 20 or more lines and used 3 fields. LOL

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