Hyperlink datatype

Discuss the database features

Hyperlink datatype

Postby davidspade » Thu Jan 25, 2018 6:45 pm

Can we have a column datatype of "hyperlink" please?
Makes a database of restaurants really slick! :D
Open Office 4 on Sierra
davidspade
 
Posts: 5
Joined: Thu Jan 25, 2018 6:37 pm

Re: hyperlink datatype

Postby Villeroy » Thu Jan 25, 2018 7:45 pm

 Edit: See my posting of 2018-02-06 for a simpler macro solution. 
Last edited by Villeroy on Tue Feb 06, 2018 10:20 pm, edited 1 time in total.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 16.04, OpenOffice 4.x & LibreOffice 5.x
User avatar
Villeroy
Volunteer
 
Posts: 25381
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Hyperlink datatype

Postby davidspade » Fri Jan 26, 2018 7:20 pm

Thank you. What do I need to do to deploy this for my database? ( haven't been a developer since the late 60s when they were called computer programmers!)
Open Office 4 on Sierra
davidspade
 
Posts: 5
Joined: Thu Jan 25, 2018 6:37 pm

Re: Hyperlink datatype

Postby Villeroy » Fri Jan 26, 2018 8:05 pm

 Edit: See my posting of 2018-02-06 for a simpler macro solution. 
Last edited by Villeroy on Tue Feb 06, 2018 10:12 pm, edited 1 time in total.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 16.04, OpenOffice 4.x & LibreOffice 5.x
User avatar
Villeroy
Volunteer
 
Posts: 25381
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Hyperlink datatype

Postby davidspade » Mon Jan 29, 2018 9:19 pm

Hi, I'm struggling here. I've downloaded the code and put it in the new folder, but I guess I now have to maker that visible to my database with its column of Web addresses, and then to presumably execute it when needed. Or is it only executed once? Thank you.
Open Office 4 on Sierra
davidspade
 
Posts: 5
Joined: Thu Jan 25, 2018 6:37 pm

Re: Hyperlink datatype

Postby Villeroy » Mon Jan 29, 2018 11:46 pm

 Edit: See my posting of 2018-02-06 for a simpler macro solution. 
Last edited by Villeroy on Tue Feb 06, 2018 10:13 pm, edited 1 time in total.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 16.04, OpenOffice 4.x & LibreOffice 5.x
User avatar
Villeroy
Volunteer
 
Posts: 25381
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Hyperlink datatype

Postby davidspade » Tue Feb 06, 2018 5:32 pm

I've had little time lately, apologies, but will get to grips with it tomorrow. Meanwhile, I should tell you that my column is WWW addresses only, as I forgot to say before. I hope this simplifies the instructions!
Thank you.
Open Office 4 on Sierra
davidspade
 
Posts: 5
Joined: Thu Jan 25, 2018 6:37 pm

Re: Hyperlink datatype

Postby jjsmith2 » Tue Feb 06, 2018 5:39 pm

Hi Villeroy,
Thanks for the response but I am not sure what to do. I clicked the link you provided above and ran the Python thing.
Here is one of the web site links I put in the database column =HYPERLINK "http://www.cakemaker.net"www.cakemaker.net
Does the syntax look correct to you?
My database includes a number of similar URL's. I created a table with various columns of data.
I then created a Form that turned out pretty good. I then added the Hyperlink icon to the tool bar.
The problem is that the icon is grayed out and won't connect to the column of URL websites in my table.
Is Open Office Base missing something here or is it me (probably me).
If Python is the only work around then what are my next steps.
Thanks.
Jim
Apache OpenOffice 4.1.5
jjsmith2
 
Posts: 5
Joined: Tue Feb 06, 2018 2:41 am

Re: Hyperlink datatype

Postby UnklDonald418 » Tue Feb 06, 2018 6:56 pm

A solution using a basic macro can be found at
Re: Join Question on Hyperlink field in table
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.5 & LibreOffice 6.0.4.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 807
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Hyperlink datatype

Postby Villeroy » Tue Feb 06, 2018 10:10 pm

https://forum.openoffice.org/en/forum/v ... 35#p438435 includes a better version of my oder URLButton macros.
Open my database, the "PythonCode" form and push the button on that form to install the macro.
Draw a button onto your own form.
Set action "Open document/web page"
Add the name of the underlying column (no form control needed).
Assign the "Approve Action" event to "My Macros" > pyDBA > ButtonURL > URLButton_Approve
If your column stores system paths, use macro FileButton_Approve instead of URLButton_Approve. This variant includes a conversion from system paths to file-URL.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 16.04, OpenOffice 4.x & LibreOffice 5.x
User avatar
Villeroy
Volunteer
 
Posts: 25381
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Hyperlink datatype

Postby davidspade » Tue Feb 13, 2018 1:40 pm

Sorry, all I have is a simple database of pubs and restaurants which includes a column of web addresses, plus a few selective queries.
I was only able to create this because it wasn't too different from Microsoft Access which I have used before, again in a rudimentary way.
There are no forms associated with this.
I think your solutions require a level of familiarity which I haven't got, because I still don't see how to apply them.
Thank you for your help any way, I'm sure the solutions are excellent, but I think I'll just give up at this point!
Regards.
Open Office 4 on Sierra
davidspade
 
Posts: 5
Joined: Thu Jan 25, 2018 6:37 pm

Re: Hyperlink datatype

Postby jjsmith2 » Tue Feb 13, 2018 3:25 pm

You need to get out of the Table button and click the Forms button then click the wizard to design a form.
Apache OpenOffice 4.1.5
jjsmith2
 
Posts: 5
Joined: Tue Feb 06, 2018 2:41 am

Re: Hyperlink datatype

Postby Villeroy » Wed Feb 14, 2018 4:26 pm

Install the latest verson of my macro. I uploaded a slightly modified version today (even simpler).
Right-click>Edit... your form.
Add a push button from toolbar "Form Controls"-
Double-click the push button for the properties dialog.
Enter the name of the hyperlink column as "additional info" on the first tab "General".
On the "Events" tab click [...] near the "Approve action" event, click [Macro...] and navivate to "My Macros">pyDBA>URLButton>URLButton_Approve
Confirm your macro selection.
Save the form.
Save the database document.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 16.04, OpenOffice 4.x & LibreOffice 5.x
User avatar
Villeroy
Volunteer
 
Posts: 25381
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Hyperlink datatype

Postby dreamquartz » Sat Feb 17, 2018 8:36 am

Hi Villeroy,

Tried the latest version from your link in both LO 5.4.4.2 and 6.0.1.1 and the outcome is the same.
Please see attachment.

Screenshot from 2018-02-16 22-25-23-1.png

When returning to your previous version all works fine.

Dream
LO 5.x and OO 4.x on Windows 7 PRO & Ubuntu 16.04 LTS.
dreamquartz
 
Posts: 633
Joined: Mon May 30, 2011 4:02 am

Re: Hyperlink datatype

Postby Villeroy » Sat Feb 17, 2018 1:46 pm

Thank you very much. I did not anticipate that wrong cursor position could be a problem. since empty URLs didn't raise any error at all.
Next try: https://forum.openoffice.org/en/forum/d ... p?id=34141
Open PythonCode form, click buton, open other form, go to new record, click buttons, nothing happens.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 16.04, OpenOffice 4.x & LibreOffice 5.x
User avatar
Villeroy
Volunteer
 
Posts: 25381
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Hyperlink datatype

Postby dreamquartz » Sun Feb 18, 2018 7:08 am

Villeroy wrote:Thank you very much. I did not anticipate that wrong cursor position could be a problem. since empty URLs didn't raise any error at all.
Next try: https://forum.openoffice.org/en/forum/d ... p?id=34141
Open PythonCode form, click buton, open other form, go to new record, click buttons, nothing happens.


Looking at the code, it appears to be incomplete.
See attached response under LO 6.
Screenshot from 2018-02-17 21-00-57.png

Dream
LO 5.x and OO 4.x on Windows 7 PRO & Ubuntu 16.04 LTS.
dreamquartz
 
Posts: 633
Joined: Mon May 30, 2011 4:02 am

Re: Hyperlink datatype

Postby Villeroy » Mon Feb 19, 2018 9:07 pm

Your form's "after recod change" event is bound to a macro that does not exist anymore. The old macro changed all URLs of all buttons that followed a naming scheme when the record was changed. Remove the form event and use the button's "approve action" event instead.

The simpler new macro makes use of the fact that the "approve action" event is called before the actual action takes place so you can manipulate the calling button's "URL" and "Action" properies and then perform the setup action with one click on a push button.
Now you can name the button any way you want, note the column name as "additional info" and assign the "approve action" event in order to turn a normal button into an URL-button. Assign the file button variant if conversion from system path to URL is needed.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 16.04, OpenOffice 4.x & LibreOffice 5.x
User avatar
Villeroy
Volunteer
 
Posts: 25381
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Hyperlink datatype

Postby dreamquartz » Mon Feb 26, 2018 9:36 am

Missed that one.
I do come across an issue that might appears to be interesting. I am using multiple tables to store information where I want to utilize this nice macro.
Examples ate "tWebSite", "tEmail", "tAddress", "tFaceBook", "tTwitter". With the previous macro there was no problem. I created a Query like qWebSiteShown to process all the WebSites, so that the button could be used. The Query runs at the Subform level fWebSite, and the Action is on the form, and not on the button.

The macro you provided here works great if the information is stored in 1 table, but that is not the case with my DataBase.

I would like to use the same principle you are offering right now, but I stay stuck @ the first record for all the tables.

Any idea what this could be?

Dream
LO 5.x and OO 4.x on Windows 7 PRO & Ubuntu 16.04 LTS.
dreamquartz
 
Posts: 633
Joined: Mon May 30, 2011 4:02 am

Re: Hyperlink datatype

Postby Villeroy » Mon Feb 26, 2018 11:23 am

It should simply work with the same buttons on the same forms. Remove the form's "After record change" event and apply the "Approve" event to the same buttons that used to work with the old macro.
Anyhow, you can still use the old one. There is nothing wrong with that. It is still contained in https://forum.openoffice.org/en/forum/d ... p?id=27032
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 16.04, OpenOffice 4.x & LibreOffice 5.x
User avatar
Villeroy
Volunteer
 
Posts: 25381
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany


Return to Base

Who is online

Users browsing this forum: No registered users and 6 guests