I would like to make words in text a button link inline, can we do this yet in FileMaker?
Word inside a text or just a text label?
If text labels, then you can just set that text as button and go to what ever URL you want.
For words inside a text, then it is a little bit more tricky and then we need to know what you had in mind
Try "Open URL" script step.
not inline (example)
Go here for help
(where 'help' is a clickable object inside the other text). No.
You might, rather, make the text as HTML (calculated) and push to Web Viewer. We/I came up with a way for a client to select text, add a 'hyperlink' and in the resulting calculation, it was valid as html. (something like this was the result of the selection scripting):
Go here for <<help|https://fmhelp.filemaker.com/help/16/fmp/en/>>
Then calculated using the "<<", "|", & ">>" as placeholders the text was converted to html and shown in Web Viewer (or as .htm text file):
Go here for <a href='https://fmhelp.filemaker.com/help/16/fmp/en/'>help</a>
Sorry to not be more explicit. Perhaps this gives you ideas?
Hyperlinks can be deployed in a web viewer.
You can also use the trick demo’d In the last section (resources) of my “Adventures” files. There, the link text is styled and the field with this data uses OnObjectEnter to perform a script. The script uses get (selectionStart ) to scan left and right of the spot clicked to get the styled text at that location.
In these files, open URL is used with this text to open a web page, but other things could be scripted such as going to a layout, using text as find criteria, etc.
Adventures in FileMaking #2-enhanced value selection
Edit note: this styled text trick does not work in iOS as tapping into a field still puts the cursor at the end of the field instead of where the user tapped and this defeats this trick.
word(s) inside/inline text to any filemaker button/script.
For words inside a text field, then you need to use a WebViewer
For buttons, then just add the script step Go to URL
Take a look at the Adventures file. You'll find that a WebViewer is not the only option if you check out how the "resources" layout is set up. It has one large text field with multiple items of text in it formatted to look like hyperlinks. Click one and a web page referenced by the text clicked opens in a web browser. While this set up uses the literal text to form the URL, that was to keep it simple. I could have written the script to use the clicked "link text" to do other things.
Would this work for non-URL link, just link any word(s) in text to a Filemaker script?
It's up to the developer to decide what to do with the "link text" clicked by the user. In practical terms, this really is an alternate way of passing data to the script much like using a script parameter. I could have gotten the same results by placing a transparent button on top of the link text and specifying the same text as a script parameter for the button. I didn't do that because: A) the correct position for the button would differ for Mac and Windows systems and B) any subsequent edits of the text would require re-positioning the button and possibly editing the script parameter. What I have in those two files is a table where I just type text into fields of a list of records and a calculation field pulls it all together into a read only field where I added the OnObjectEnter trigger to perform the script that opens the clicked URLs. In my example, I use the "link text" verbatim with Open URL as it keeps this simple, but I didn't have to do that.
So say you have blue underlined text in the field that reads: "Click Here". Once the script has scanned left and right to extract "Click Here" as text, your script can do whatever you set it up to do with that information. It could, for example, search a table for "click here" and then use the text in a different field of the same record to get a URL or it could get the name or number of a layout in your solution in order to go to it. Or an associated field could provide a definition of the clicked text that you pop up in a card window. The list of possible options is pretty much endless, but do note a key limitation: each bit of "link text" has to be unique if each is to do something different. You can't set up "click here" to do one thing and have "click here" in the same field do something different (at least not without additional coding that used the position of the cursor to distinguish between the two.)
I was playing around with (ie. creating and testing) a lot of design ideas for a "FileMaker E-document" approach to writing about FileMaker before I created the first "Adventures" file. One of my early ideas was to implement "link text" and to publish as an FM GO file so that you could read the article on your phone or iPad while using your computer to work with the concepts. Tapping those links would have allowed users to "drill down" into more detailed descriptions of concepts and/or pop up supplemental objects tangentially related to the article that they were reading.
That idea crashed and burned on several issues--one of which was and still is that tapping a field in FM GO always puts the cursor at the end of the field, not where you tapped and this defeats the technique used here. I also decided that having a single file open on the computer was simpler as I could show working examples of the concepts and documentation right on the same screen in the same window. But I'd worked out how to make this process work as long as it wasn't a file used on an iOS device so when I started putting together the Resources layout where I wanted such a "hyperlink" UI design, I had a ready made tool in my tool box to make it work. It also is an extension of one of the concepts presented in one of the two files and thus also serves as a bit of an "extra credit" challenge to the reader for those interested.
Ironically, the idea of using hyperlinks in a web viewer--which would work on iOS, didn't occur to me at the time.
30 years later and we're still playing catch-up with HyperCard in that regard …
Ditto! Miss my HC!
Sent from miPhone
Yes, HC was part of what introduced me to GUI design before I acquired my first copy of FileMaker.
No but I did submit a product Idea for this a while ago
Create a button out of text within a text box
Retrieving data ...