AnsweredAssumed Answered

Paste a text field's contents into URL string

Question asked by hsutton47 on Aug 13, 2011
Latest reply on Aug 16, 2011 by hsutton47

Title

Paste a text field's contents into URL string

Post

Hello, I am using FileMaker 10 Pro Advanced and I am a novice, learning as I go.  I am building a video db.  In the  record of a video title, I have a link to IDBM.com's home page assigned to a button. 

But what I would love to do is, when I click on the IDBM.com's hyper link button, it feeds the title into the URL search string so that the related title for that movie is displayed instead of having it just take me to the home page to manually fill-in the film's title in the search box.

I researched how to go directly to a searched title's page using this:

http://www.google.com/search?q=imdb+%22Movie+Title%22&btnI=I%27m+Feeling+Lucky

Where the "Title" appears above, I would like the displayed record's TITLE field's text string to be poked
in to the URL search syntax.

I started a script to attach to the "IDBM.COM" button but it's not working (of course--I'm struggling
with scripts).

Example:

The displayed record's TITLE field contains: TRUE GRIT (2010)

If I go to a browser's address bar and type in the following URL manually, it takes me to the "True Grit (2010)"
page at IDBM.com.

http://www.google.com/search?q=imdb+%22"+True Grit (2010)+"%22&btnI=I%27m+Feeling+Lucky

So I attempted to write a script to attach to the IDBM.com button in the record:

 Set Variable [$title; Value:VIDEODB::TITLE]
Open URL["http://www.google.com/search?q=imdb+%22"+$title+"%22&btnI=I%27m+Feeling+Lucky"]

It doesn't work. I just got a pop-up dialog box with a numeric string in it.

How can I pick up the contents of a record's TITLE field, and have that inserted into the URL syntax to
have it work like it does if you manually type in the title?

Outcomes