jmci Posted September 6, 2011 Posted September 6, 2011 I want users of my database to be able to enter a web site URL into a field in my database. Anyone familiar with Microsoft Outlook will be familiar with the Web Page Address field in the Contact form. When the user enters a value into this field and leaves the field, Outlook converts the value into an active link. When the user clicks on the link in this field on the Contact form, the web browser opens and goes to the address. I want users to be able to do the same thing on my FileMaker form layout. How do I do this? I've used a text field for this Web Page Address field. Should I be using a different field type?
jmci Posted September 6, 2011 Author Posted September 6, 2011 Use the Open URL script step. Thanks Vaughan. I placed a button beside the WebSiteAddress field on my FileMaker form and made it execute the Open URL script step without dialog passing the value of my WebSiteAddress field to the script step. This does just what I wanted but it's not as slick as Microsoft Outlook (sigh).
comment Posted September 6, 2011 Posted September 6, 2011 Working the way you describe, how can you edit the URL value?
jmci Posted September 7, 2011 Author Posted September 7, 2011 Working the way you describe, how can you edit the URL value? My form layout is based upon a table named Company. One of the fields in Company is a text-type field named WebSite. I've placed an edit box control on the Company form layout for the Website field. The user enters and edits the URL in this field. Next to the Website field there is a button that executes the Open URL script step and takes the URL value from the WebSite field. Does that answer your question? I'd originally hoped to programmatically convert the text value in the WebSite field into a hypertext link as soon as the user leaves the edit box control like Microsoft Outlook does in it's Contact form but this is an acceptable work-around. Can you think of a better idea?
comment Posted September 7, 2011 Posted September 7, 2011 Does that answer your question? No, my question was regarding what you describe as the preferred alternative, i.e. "convert the text value in the WebSite field into a hypertext link as soon as the user leaves the edit box".
jmci Posted September 7, 2011 Author Posted September 7, 2011 No, my question was regarding what you describe as the preferred alternative, i.e. "convert the text value in the WebSite field into a hypertext link as soon as the user leaves the edit box". My preferred alternative is the way the Web Page Address field works in the Contact form of Microsoft Outlook. It looks just like the same kind of edit box control as all the others. The user can enter that edit box control and type a URL. When the user tabs out of the field the value all of a sudden becomes underlined (a hyperlink) if the value is in an accepted format for a URL. For example, if the user enters "test" and tabs out of the field, the value "test" doesn't become underlined (hyperlink not created). If the user clicks on the underlined value in the edit box, the browser opens to the URL. If the user wants to change that value, the user just has to click on the box (the contents become selected) and type-over the existing value. Slick eh? I wish I could do that with FileMaker but, if not, I can live with Vaughan's solution.
bcooney Posted September 7, 2011 Posted September 7, 2011 Oh, so to edit the existing value, you click on the field boundary? How is that obvious? Seems like the place for a padlock icon...
jmci Posted September 9, 2011 Author Posted September 9, 2011 Oh, so to edit the existing value, you click on the field boundary? How is that obvious? Seems like the place for a padlock icon... If you want to edit the existing value you just click into the field edit box control, or tab into the field, as you would on a FileMaker form layout. It couldn't be more obvious. I can't describe it any better. There have to be tens of millions of Outlook users. Ask somebody to show you the Contact form and you'll see what I mean. Anyway, for now I'm satisfied with using a button next to the edit box that runs the Show URL script step (actually it calls a script that executes that script step after some defensive programming).
comment Posted September 9, 2011 Posted September 9, 2011 If you want to edit the existing value you just click into the field edit box control It seems you'd need to be careful not to activate the script. I can't say such UI appeals to me, but have a look at the attached. URL.zip
Fitch Posted September 9, 2011 Posted September 9, 2011 In one of my solutions, the URL field is formatted to resemble a link (blue, underlined) and the field is set as a button with a script that: if the field is empty, enters the field, otherwise performs the Open URL script step. Next to the field, a small pencil icon is a button that enters the field so it can be edited.
jmci Posted September 10, 2011 Author Posted September 10, 2011 Thanks for the input everyone. I'm just going to go with the solution described in posting #4. I guess I'm happy enough with that.
Recommended Posts
This topic is 4881 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