Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Quito last won the day on March 19 2020

Quito had the most liked content!

Profile Information

  • Industry
    Healthcare - Research
  • Gender
  • Location
  • Interests
    Google Neural Machine Translation; Artificial Intelligence; Big Data; Virtual Libraries

FileMaker Experience

  • Skill Level
  • FM Application

Platform Environment

  • OS Platform
  • OS Version

FileMaker Partner

  • Certification
    Not Certified

Recent Profile Visitors

2,526 profile views

Quito's Achievements


Enthusiast (6/14)

  • Dedicated Rare
  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done

Recent Badges



  1. Thank you so much Comment, This suggestion got me thinking and I resolved it by replacing all spaces and punctuation with pipe (|). I also added some spaces here and there to make it easier to read. Now each word begins and ends with |, and my known patterns begin and end with | as well (see screenshot). The words are coded and the word in blue is misspelled! The next steps will be 1. Underline unknown words in the source text (not present in the "known pattern") 2. Offer suggestions for replacement With that it I will finally have a main dictionary, free from the 32KB or 2882 storage limit! Again, thank you very much! Daniel
  2. Hi, This is a split thread from Where I began with a fairly large amount of substitutions with codes appended to the known patterns. Comment kindly provided a simpler solution MultiPatternCount+Hilite.fmp12, which beautifully resolves the problem using two Custom Functions: HiliteSingle and HiliteMulti. I start with the text field with TextColor ( string ; RGB(73;99;140)) Blue. If the pattern is detected, and the code is harvested, the known pattern changes to TextColor ( string ; RGB(0;255;0)) Green. The current problem is that it's not recognizing whole words/phrases but rather shorter patterns first. I've ordered the known patterns by counting the amount of characters and then ordering by Length in descending order (from highest to lowest number of characters). If you look at line 3, second word, "aggrediantur" and "rediantur" are both coded but, as it found "rediantur" first, "aggrediantur" was ommitted. See screenshot: Let's look at HiliteSingle: ---------- Let ( [ // Here should be a "If 1st letter of word pattern is TextColor Blue perform HiliteSingle" in order to change it to TextColor Green after processing and not go over the same word/phrase recursively with smaller known patterns. // Or otherwise replace the known pattern with its code and, when the process is finished, change it back to the known pattern pos = Position ( text ; searchString ; 1 ; 1 ) ] ; Case ( pos ; Let ( [ textBefore = Left ( text ; pos - 1 ) ; len = Length ( searchString ) ; string = Middle ( text ; pos ; len ) ; textAfter = Right ( text ; Length ( text ) - pos - len + 1 ) ] ; // Was previously TextStyleAdd (string; HighlightYellow) but I changed it to TextColor ( string ; RGB(0;255;0) ) Green for the reason mentioned above textBefore & TextColor ( string ; RGB(0;255;0) ) & HiliteSingle ( textAfter ; searchString ) ) ; text ) ) --------------- HiliteMulti doesn't seem to need any changes, so the code only seems to be missing the line immediately after Let. Can you help me a bit with this? Best regards, Daniel
  3. That's brilliant! And very useful for other projects I have that are still using Substitute. Thanks! Will start another post to continue the train of thought of MultiPatternCount+Hilite.fmp12 Best regards, Daniel
  4. Hi Comment, So finally I was able to study your reply and replace my "8000 substitutions + CF" with your solution. It takes a little longer to process, as it needs to populate the code list but I'm fine with that as the end result is much much better now. Although the patterns are sorted in descending order, I'm not too sure that they are being processed that way. Maybe the sort needs to be scripted as well? I tried placing quotation marks to each pattern in hopes of forcing "Match phrase from word start" but it didn't work. Could you please elaborate a bit further on your solution "substitute each found pattern with some arbitrary string in order to prevent it from being found again using a shorter pattern"? It seems a plausible way of forcing "Match whole word" to MultiPatternCount+Hilite.fmp12. Does this mean that the arbitrary string in the "copy of the original text in a variable" would become a jumble of characters or repeated words? It sounds very interesting as the proof of correct alignment would be the codes themselves. Cool! Maybe I can make it recursive. Something like "If first letter of pattern is Bold+Hilite, skip" Thank you. I really appreciate it! Best regards, Daniel
  5. Filemaker should interact with PowerPoint via an Applescript, invoked on Button click. The script should select each record within Filemaker and perform a find-replace until all the records have been processed.
  6. The Filemaker file has two fields, one for 'find' and one for 'replace with'. I have a button which calls the script that should recognize that a powerpoint file is open and perform replacements within the entire file. I made one for replacing text within Word documents but it doesn't work the same because of the shapeName and shapeText variables.
  7. I have two fields in FileMaker, one with the find text and the other with the replace text, plus some formatting conditions (highlight, forward, format). Filemaker contains a database with the find-replace pairs. So, instead of performing find-replace within Powerpoint by hand, I run the replacements from Filemaker.
  8. Hi, Piecing bits from other posts I've cobbled something that looks promising: ------------ tell application "Microsoft PowerPoint" activate repeat with slideNumber from 1 to count of slides of active presentation tell slide slideNumber of active presentation repeat with shapeNumber from 1 to count of shapes set shapeText to content of text range of text frame of shape shapeNumber set selFind to get find object of selection clear formatting selFind set highlight to false set forward to true set format to true set newText to my replaceText(shapeText, findText, replaceText) if newText ≠shapeText then set content of text range of text frame of shape shapeNumber to newText end if end repeat end tell end repeat end tell on replaceText(theText as text, findString as text, replaceString as text) set {oTIDs, AppleScript's text item delimiters} to {AppleScript's text item delimiters, findString} set textItems to text items of theText set AppleScript's text item delimiters to replaceString set theResult to textItems as text set AppleScript's text item delimiters to oTIDs return theResult end replaceText ----------- The script order is probably off and certainly some lines are unnecessary. Anyone care to pitch in? All the very best, Daniel
  9. Try ScribeDifferenceReport: https://static.360works.com/plugins/Scribe/documentation.html#ScribeDifferenceReport
  10. Hi, Comment: One PubMed ID (PMID) can contain, depending on the language, either: 1. One field: Summary 2. Five fields: Background (or an Introduction), Objective, Population and Methods, Results and Conclusions 3. Four fields: Objective, Methods, Results and Conclusions The field c_English_FullAbstract should combine options 1 or 2 or 3 with their corresponding contents. Currently, if the script finds content within Summary, it retrieves that and stops. I think what I'm missing is a parameter like this at the beginning of the script: Find all records that have the same PMID and then combine options 1 or 2 or 3 with the contents of their fields into c_English_FullAbstract. Best, Daniel
  11. Thank you, Comment: I discovered that the script skips empty results and retrieves the first field with contents and then stops. For example, if 'Background' is empty, it skips to the next category. If it finds an 'Objective', then it retrieves that and the script stops, so the remainder of the PubmedArticle is not retrieved. Thus, I'm not using Let/Case/If appropriately as I was expecting it to retrieve all categories within the PubmedArticles, while skipping the categories that are empty. I'm adding the FileMaker demo file in hopes you or someone in the FM Forum can give it a look. There are three layouts. Portal is for seeing all the Categories and Text available for a given PMID. c_Abstract shows all the fields (empty or not) and the last field within it (c_English_FullAbstract) is trying to combine everything into a single field. PMID: 31618392 has many content options for testing. It's tricky, as the Text field depends on Language and Category, and there are many ways of writing a Category (Uppercase, Lowercase, Singular, Plural, etc). I discovered that the only constant in the Category is that the first letter is always Uppercase, so I created a calculated field and used it as a filter. Best, Daniel PubMedAbstract.fmp12
  12. I've tried to combine Pubmed Fields into one Calculation field: -------------------------- Let ( [ B = If ( PubMedArticles::Category = "Background" ; TextStyleAdd ( "Background: " ; Bold ) & PubMedArticles::Text & "¶" ; "" ) ; O = If ( PubMedArticles::Category = "Objective" ; TextStyleAdd ( "Objective: " ; Bold ) & PubMedArticles::Text & "¶" ; "" ) ; M = If ( PubMedArticles::Category = "Methods" ; TextStyleAdd ( "Methods: " ; Bold ) & PubMedArticles::Text & "¶" ; "" ) ; R = If ( PubMedArticles::Category = "Results" ; TextStyleAdd ( "Results: " ; Bold ) & PubMedArticles::Text & "¶" ; "" ) ; C = If ( PubMedArticles::Category = "Conclusions" ; TextStyleAdd ( "Conclusions: " ; Bold ) & PubMedArticles::Text & "¶" ; "" ) ; BOMRC = B & O & M & R & C ] ; BOMRC ) ---------------------- But it's disregarding all categories except "Objective". P.S. This is a continuation of 'https://fmforums.com/topic/105600-pubmed-xml-xsl-for-otherabstract/' Best, Daniel
  13. Hi ggt667, Sorry, I forgot to add the link to the official E-Utilities provided: https://www.ncbi.nlm.nih.gov/books/NBK25497/ Best, Daniel
  14. Basically, I could create an interface to PubMed and search/retrieve/read in any language. There are many components within PubMed freely available in multiple languages. For example: https://www.ncbi.nlm.nih.gov/pubmed/?term=J+Med+Internet+Res+2014%3B16(12)%3Ae271 Best, Daniel
  15. Indeed, that would be very cool!
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.