August 4, 20196 yr 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:
August 4, 20196 yr 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 August 4, 20196 yr by comment
August 4, 20196 yr Author 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.
August 4, 20196 yr 17 minutes ago, Schneids said: I'm not even sure exactly how it's working. I am not sure either, since I can't see the actual data it's working with.
August 4, 20196 yr Author The data comes from an extremely simple table, with just a few fields. See attached.
August 5, 20196 yr 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 August 5, 20196 yr by comment
Create an account or sign in to comment