Gilbert13 Posted August 21, 2017 Posted August 21, 2017 Hi, Using a script I will like to find and remove only the word "Home" in a paragraph. is this possible? Thanks in advance
comment Posted August 21, 2017 Posted August 21, 2017 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"?
Gilbert13 Posted August 21, 2017 Author Posted August 21, 2017 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
Lee Smith Posted August 21, 2017 Posted August 21, 2017 You can filter that out. Filter (yourField); "0123456789")
comment Posted August 21, 2017 Posted August 21, 2017 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?
Gilbert13 Posted August 23, 2017 Author Posted August 23, 2017 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.
Lee Smith Posted August 23, 2017 Posted August 23, 2017 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
comment Posted August 23, 2017 Posted August 23, 2017 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 1
Gilbert13 Posted August 23, 2017 Author Posted August 23, 2017 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
Lee Smith Posted August 23, 2017 Posted August 23, 2017 (edited) 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, 2017 by Lee Smith fixed the links 1
Gilbert13 Posted January 25, 2018 Author Posted January 25, 2018 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
Lee Smith Posted January 25, 2018 Posted January 25, 2018 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
Gilbert13 Posted February 8, 2018 Author Posted February 8, 2018 Hi Lee, How can I use the == signs so the script substitutes the exact value in gSearchString? Thanks
Lee Smith Posted February 8, 2018 Posted February 8, 2018 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
Recommended Posts
This topic is 2478 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 accountSign in
Already have an account? Sign in here.
Sign In Now