This must have been answered before, but..
In a spreadsheet, eg Excel, it is possible to populate a table using data from a table in a web page.
Can this be done in Filemaker Pro?
6 replies to this topic
#1 OFFLINE enthusiast
Posted 01 February 2012 - 01:28 AM
#2 OFFLINE consultant
Posted 01 February 2012 - 04:07 AM
It's possible, though it's certainly no fun - and anytime the webmaster decides to change anything, your solution fails. You need to look at the HTML code of the web page, available through the GetLayoutObjectAttribute() function, and parse out the data out of there using some "navigation points" that you think (hope) are constant, for example: the second <table> element, third row, fifth cell.
#3 OFFLINE consultant
Posted 01 February 2012 - 04:46 AM
Do you have access to the source of the data behind the web page? If so, you could use ESS.
#4 OFFLINE enthusiast
Posted 01 February 2012 - 12:55 PM
I know how to do it using php (fopen,fread and fprint) and insert, I could also probably use page-scraping via Curl;I could probably manage it via an intermediate step. I could also do it in excel and script an import into Filemaker - again a two-step process; a pain and error-prone.
But it's a snap in excel I thought it would be a sought-after feature in FMP
.
@bcooney - the page's xml as presented on the site is all I need; in the past I've used Yahoo's currency exchange rates to add to an Excel spreadsheet of my own holiday budget. After a week or so the Indonesian Rupiah rate goes up, my Excel database refreshes and automatically displays how much my daily Bali holiday allowance will be for each item: banana smoothies, massages and house by the beach.
I'll look up what ESS IS.
@comment
Can you give me a better idea of ho to use GetLayoutObjectAttribute() ?
For example, If wanted the "Slogan of the Day" from http://home.exetel.com.au/re/ to appear in a database field, how would I connect to that URI and parse out the slogan text from:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title>We only subsist.</title>
</head>
<body>
<br>
We only subsist.<br>
</body>
</html>
But it's a snap in excel I thought it would be a sought-after feature in FMP
.
@bcooney - the page's xml as presented on the site is all I need; in the past I've used Yahoo's currency exchange rates to add to an Excel spreadsheet of my own holiday budget. After a week or so the Indonesian Rupiah rate goes up, my Excel database refreshes and automatically displays how much my daily Bali holiday allowance will be for each item: banana smoothies, massages and house by the beach.
I'll look up what ESS IS.
@comment
Can you give me a better idea of ho to use GetLayoutObjectAttribute() ?
For example, If wanted the "Slogan of the Day" from http://home.exetel.com.au/re/ to appear in a database field, how would I connect to that URI and parse out the slogan text from:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title>We only subsist.</title>
</head>
<body>
<br>
We only subsist.<br>
</body>
</html>
#5 OFFLINE consultant
Posted 01 February 2012 - 02:05 PM
Quote
For example, If wanted the "Slogan of the Day" from http://home.exetel.com.au/re/ to appear in a database field
See the attached example.
ScrapeExample.zip 5.5K
31 downloadsQuote
the page's xml as presented on the site is all I need;
XML is very different from a "web page"; Filemaker can import XML directly from a remote site, as long as it can be retrieved by a GET request.
#6 OFFLINE enthusiast
Posted 02 February 2012 - 09:12 PM
I posted this because somehow I'd expected Filemaker to include some sort of WYSIWYG table-data-sync like excel; when I look for features and cannot find them I rarely presume that the features just aren't there in the first place!
@comment:
The scrape file seems straightforward, thank you.
Since my randomly chosen scenario was over-simplified, can you please take a look at the Brisbane Weather page for the next 7 days and tell me if the GetLayoutObjectAttribute function could still somehow be used with all the multiple field values? I magine I'd have to repeat something like your "Scrape" script multiple times.
I remember once (in a government website job, limited in what tools I had available), I did a two-step scrape of a table via Google Docs. As with Excel, inelegant but worked.
Sorry, I meant XHTML, not XML.
@comment:
The scrape file seems straightforward, thank you.
Since my randomly chosen scenario was over-simplified, can you please take a look at the Brisbane Weather page for the next 7 days and tell me if the GetLayoutObjectAttribute function could still somehow be used with all the multiple field values? I magine I'd have to repeat something like your "Scrape" script multiple times.
I remember once (in a government website job, limited in what tools I had available), I did a two-step scrape of a table via Google Docs. As with Excel, inelegant but worked.
comment, on 01 February 2012 - 02:05 PM, said:
XML is very different from a "web page".
Sorry, I meant XHTML, not XML.
#7 OFFLINE consultant
Posted 03 February 2012 - 12:12 AM
goanna300, on 02 February 2012 - 09:12 PM, said:
can you please take a look at the Brisbane Weather page for the next 7 days and tell me if the GetLayoutObjectAttribute function could still somehow be used with all the multiple field values?
I don't see why not. Same principle, more work. Keep in mind that a script can be programmed to loop.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users































