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

Recommended Posts

Posted

Hello

I have a situation that I would like to make a calculation to pick a random word in a sentence of varying length change it to a "_______" and paste in the field "missing word" . I don't know if this is possible because of the length of the sentence being variable . Also since this will be used for an english drill I would be looking for words longer than 4 letters. This may be too difficult. But thanks for answers

Ps If the word didn't look like the best choice to restore to original sentence and try again. More Thanks

Posted

Hello journeyman,

It sounds like you want the Substitute() function. Assume your text is in a field called Text and you use a global text field called gString where you type in the phrase or words you wish to find in the text. Then calculation (result is text) would be:

Substitute ( Text ; gString ; "missing word" )

I didn't get the underline part. Maybe an example will help us pin down a calculation for you. :-)

Posted

Thank you so much. That is exactly what I am looking for. But I would like to have the "_______" to show up without the last letter. I can't figure it out . _______ instead of ______s etc. Thanks so much

Is it possible the calculation could overlook certain words if I could put in a list?

Like "the" "be" "Matthew" etc?

Posted

I am using the calc that comment posted because it works so well with the exceptions I just mentioned. Thanks I hope comment will amend the calc so I can get rid of the last letter on the "________" (blank)

Posted

I am so sorry - My sentences had quotations around them and that caused the problem.

I still wish there was a way to use your file but not use certain words that i could make a list of that would become random.

Posted

try to add:

and IsEmpty ( FilterValues ( ValueListItems ( Get ( FileName ) ; "YourValueList" ) ; MiddleWords ( Sentences::Sentence ; $n ; 1 ) ) )

to the calculation for the Exit Loop If [ ] script step.

P.S.: YourValueList is the name of the value list of the exceptions.

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