Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Click word, brings to corresponding record

Featured Replies

 I have a rather large database, and I want to be able to click on a word that is in one entry, and have it take me to that data entry. Is this possible? Would I need to create each individual link? Or is there a way to stream line this?

Let me know if that doesn't make sense, and I'll try to explain further what I want to do.

 

 

I asked around on the official file maker forums, but was never able to figure it out. They gave me a script which I got mostly working, but now can't get it to work.

 

I was wondering if there was another way to do this? Any help would be greatly appreciated.

 

Set Variable [$Cursor ; value: Get ( ActiveSelectionStart ) ]
Set Variable [$start ; value: $Cursor ]
Set Variable [$Text ; Get ( ActiveFieldContents ) ]
#Scan left
Loop
   Exit Loop If [PatternCount ( " ¶.?"!&,:" ; Middle ( $Text ; $start ; 1 ) // exit if character is a space, return or punctuation ]
   Exit Loop If [ $Start = 1 ]
   Set Variable [$Start ; value: $Start - 1 ]
End Loop
#Scan Right
Set Variable [$End ; value: $Cursor + 1 ]
Loop
   Exit Loop If [PatternCount ( " ¶.?"!&,:" ; Middle ( $Text ; $End ; 1 ) // exit if character is a space, return or punctuation ]
   Exit Loop If [ $End =  Length ( $Text ) ]
   Set Variable [$End ; value: $End + 1 ]
End Loop
Set Variable [$word ; value: Middle ( $Text ; $End - $Start ) ]
#Perform a Find
Go to Layout [specify layout based on table to be searched here]
Enter Find Mode []
Set Field [YourTable::YourFIeld ; $Word]
Set Error Capture [on]
Perform Find []

 

 
I want to be able to click on a word that is in one entry, and have it take me to that data entry.

 

I am afraid that's not very clear. How about a simple example? You have a text field in a table of [?], it contains the following text "[?]", and when I click the word [?] I want to be taken to [?]. And why is this necessary?

  • Author

Sure! Sorry about that.

 

I have the text field Description, in a table of 17k+ records.  It contains Omni + Potent. When I click on the word Omni, I would like to be taken to the corresponding record Omni.

 

It's necessary to make navigating the database more efficient, as opposed to using the search function, as well as my boss was wondering if it was possible.

Screen_Shot_2013-10-09_at_3.29.17_PM.png

If I understand this correctly, you have a structural problem here which you are trying to bypass, instead of solving it. Of course, with this little information I am mainly guessing, but it seems to me that a record of "Omnipotent" should have two related records, one of "Omni" and one of "Potent". These two records would be shown in a portal, and clicking on one of them would call the Go to Related Record script step to ... well, go to the related record.
 
Since the same word (e.g. "Omni") can be used in more than one word (e.g. "Omnipotent" or "Omnibus"), you will need to use a second table as a join table, so that your relationship graph will look something like:
 
Words -< Components >- ChildWords

 

or, if you also want to see which words the current word is a part of:

ParentWord -< Components 2 >- Words -< Components >- ChildWords

 

(the blue TOs are occurrences of the Words table, the green ones are occurrences of the Components join table)

BTW, just for fun, here's a slightly(!) simpler script to capture and find the clicked word:

# 1. CAPTURE CLICKED WORD
Set Variable [ $clickedWord; Value:
   Let ( [
   text = Get ( ActiveFieldContents ) ;
   textBefore = Left ( text ; Get ( ActiveSelectionStart ) )
   ] ;
   MiddleWords ( text ; WordCount ( textBefore ) ; 1 )
   ) ]
# 2. FIND IT
Perform Find [ Specified Find Requests: Find Records; Criteria: YourTable::Description: “$clickedWord” ][ Restore ]

But really, this is not a good way to proceed. You will encounter many other problems unless you fix your structure, esp. when it comes to reporting on your data.

Ah.  I will remove my posts since they didn't apply in this case and I don't want to lead folks down the wrong path.  :-)


That script of yours IS fun!

Okay, but I'm keeping this one:

 

Chuck Norris can double-click before OnObjectEnter triggers.

I've been trying for five minutes to double-click fast enough.  Does that make me a blonde?  I finally Googled your phrase and landed here and now I'm laughing my glasses off!!

 

http://www.devtopics.com/best-programming-jokes/

 

I haven't found Chuck in it yet but I see a lot of Chuck Norris jokes that fit.  i guess I'd better cancel my audition to the world Master's karate championship then.   Bummer.

Never a thing ... until now.   :jester:

  • Author

Could you explain what you mean by structure? Is it the layout of the records itself?

 

Would the same script apply for the Sign Family box? That's also where the scrip is going You click on the word Economy in Sign Family, and it brings you to that record.

 

vqksoo.png

 

If the scripting isn't viable, as it seems there will be countless problems, would hyperlinking the words work? Or is this something for FM Web Direct/publishing it online. 

  • Author

(Wasn't sure where to put this question, sorry if its in the wrong spot)

 

I saw an article about natively hyperlinking a record, to another record. Unfortunately I wasn't able to view the tutorial without paying an absurd subscription fee...

 

So I was wondering how this was possible? It can be done with custom functions and some fiddling around with things. But I'd love to know how to do it.

 

Any help would be great.

Hi Jackie, and Welcome to the FM Forums,

 

I’m guessing you mean Hyperlinking Records by ISO Magazine. I find ISO Magazine to be an excellent resource for FileMaker developers and I’ve been a subscriber for many years. For a Quarterly subscription of $24.95,  you have  access to any and all of the articles and you can cancel your Subscription at anytime. 

 

Disclaimer, I have no affiliation with ISO other then being a subscriber.

Edited by Lee Smith
Disclaimer

Could you explain what you mean by structure?

 

Okay, so obviously I have been mistaken about the nature of your database. I am not sure I understand it now (it's kind of difficult, having only two screenshots to go by).

 

Let me answer this in general: you should have a separate table for each class of objects (entity) you are tracking. For example, if you are making a dictionary, then you would have a table of Words (or, more precisely, headwords i.e. lexemes), where each word has one unique record. Now, if there are families to which words can belong to, then you would also have a separate table of Families, with a record per family.

 

The next question you need to ask yourself is what is the relationship between these entities? Possible answers are (a) one-to-many (each word belongs to one family only), or ( B) many-to-many (a family has many words, each word can belong to several families). If you answered ( B), you will need a third, joining table to implement the relationship.

 

The gist of this is that any time you have a "many" of something, that "many" needs to be comprised of individual records in a related table - not individual words (or paragraphs, or anything) in a text field. And you show these records in a portal, where each one occupies a row of its own that can be clicked - without any trickery required to select the clicked needle in a text haystack.

I merged your two topics. Please do not multiple post your questions.

 

If you want to know more about this action, please contact me by Private Message.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.