Jump to content

Substitute Keywords from Related Table - exceed 1000?


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

Recommended Posts

I'm looking for some help with a script for final keywords that needs to substitute keywords from a related table. This was working fine until I exceeded 1000 records in the related table that the replacement keywords come from. Apparently Filemaker has a 1000 row or record limit for this kind of script. Does anyone know a work-around for this? Here's the script I'm using: 

1485947452_ScreenShot2019-08-04at11_14_50AM.thumb.png.fdeef130973aea33164cea57a485dbdb.png

Link to comment
Share on other sites

The Substitute() function has a limit of up to 999 search/replace pairs. If you're getting your pairs as a list from a related table, it should be easy to split the list to chunks of up to 999 values, using a loop and a calculation of:

MiddleValues ( $listOfValues ; 999 * ( $i - 1 ) + 1 ; 999 )

 

Or perhaps it might be simpler to have the script loop over the entire list and perform a single-pair substitution at each iteration?

 

Edited by comment
Link to comment
Share on other sites

Thanks for your response. I have limited FM scripting skills, so I need a bit more help on how to implement that. Someone else wrote the original script, so I'm not even sure exactly how it's working. Would I use a loop within my loop? Do I use the MiddleValues function within my Substitute function? Sorry for the dumb questions. I would gladly pay someone to just fix this for me. 

Link to comment
Share on other sites

21 hours ago, Schneids said:

See attached. 

I am afraid that does not allow me to see your script in full context. It seems to be doing more than just substitution.

Have a look at the attached demo. It shows the simplest method to perform multiple substitutions, with no limit on their number (other than available memory). Note that this works on a single record; if necessary, you can add an outer loop to do this for all records in the current found set.

Also keep in mind that (a) the Substitute() function is case-sensitive and (b) subsequent substitutions are nested, so the order can matter.

 

MultiSubstitute.fmp12

Edited by comment
Link to comment
Share on other sites

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