August 21, 20178 yr Hi, Using a script I will like to find and remove only the word "Home" in a paragraph. is this possible? Thanks in advance
August 21, 20178 yr Yes, it's possible. Tell us more. Is your search case-sensitive? What about words that contain the string "home" e.g. "homeless" or "psychometric"?
August 21, 20178 yr Author Great!!! Yes case-sensitive, and the search must be exact because there are other words that contain "home". Let's say I need to remove HOME000009 from the list but leave the rest. home000005 home000008 HOME000009 Appartment000004 Room0000012
August 21, 20178 yr I am afraid this is still not clear enough. You did not mention a list until now. A return-separated list of values is not the same thing as paragraph of words (even if your list contains only single-word values). Anyway, it sounds like you want to go over a list of values, and remove a value if it contains the string HOME (case-sensitive) - is that correct?
August 23, 20178 yr Author Sorry for not explaining correctly, honestly I thought that for FileMaker a return-separated list was the same thing as a paragraph. You're right, I need to find a value in a return separated list and delete it from the list.
August 23, 20178 yr Hi Gilbert, 20 minutes ago, Gilbert13 said: I need to find a value in a return separated list and delete it from the list. Delete what, this home000008, or the word "home" (leaving the 000008)? Lee
August 23, 20178 yr 26 minutes ago, Gilbert13 said: I need to find a value in a return separated list and delete it from the list. See if something like this could work for you: RemoveValues.fmp12
August 23, 20178 yr Author Yes, exactly what I need, thank you very much to both for the help. Please can you recommend some book that teaches how to build scripts? Thanks
August 23, 20178 yr I don't think we can recommend a specific book, there are some variables we don't know, such as your skills. I would recommend that you check out the book stores near you, or go online to ecampus.com Barnes and Noble Amazon.com You can download the Sessions Material from DevCons 2017, this session https://community.filemaker.com/docs/8302 has a video here https://www.youtube.com/watch?v=8Ts9P95CbRY&feature=youtu.be that you may find helpful. I can recommend some Training Sites that offer sessions on scripting and a lot more. HTH Lee Edited August 23, 20178 yr by Lee Smith fixed the links
January 25, 20187 yr Author Hi Comment, It is possible to modify the script so that will only removes the exact string in gSearchString ? I have the following numbers in source. Instead of just removing 2 the script also remove 22 when the value in gSearchString is 2 2 3 9 22 55 Thanks in advance
January 25, 20187 yr Look at the options in Find for a Field. I think you are wanting the == find option. https://fmhelp.filemaker.com/help/16/fmp/en/index.html#page/FMP_Help%2Ffinding-text.html%23
February 8, 20187 yr Author Hi Lee, How can I use the == signs so the script substitutes the exact value in gSearchString? Thanks
February 8, 20187 yr Hi Gilbert, The script furnished by comment was written to isolate the records that started with a specific pattern in front of the numbers. You don't need a script for a simple find such as the number 2 in a number fields, as long as it is the only number. By chance are these the remaining numbers that are in your original field? Your find request in a number field for 2, should not be returning 22. Perhaps if you should attached a copy of the file, so we can be sure we provide a script you can plug in to your file. This post by Ocean West provides info on how to protect your confidential data. Anatomy of a Good Topic I added a demo of a simple scripted find. HTH Lee FindNumbers.fmp12
Create an account or sign in to comment