Look at the INSERT FROM URL script step.
You might have to download it to figure out it it's updated. If the downloaded CSV file doesn't have the right metadata, then perhaps you could have another file on the server with the current (or updated) CSV version you could download first. If that other file has the "new version", then you could download the CSV.
And, you might want to consider writing a REST web service, with actual methods you could call to do what you want vs. a simple Website URL. That Web Service could have a method with the current "version" of the CSV and another method to package it up and let you download it.
HOPE THIS HELPS.
So do I dump that file then into a field ? Like a container ?
Could you not simple access the file with a webviewer and "scrape" the csv content with a script?
Never tried it but might be easier than import.
Just me thinking out loud.
"scraping" is a red flag. it can work, but be more trouble that it's worth, be prone to change through the actions of the host, etc.
it doesn't like its a .csv I get connection failed.
Just go to a web browser and put in the URL and download it and then open it to see what type of file it is. It could be CSV saved as a Microsoft Word format or something stupid like that. You just never know. Also, most CSV files I have dealt with have the .txt file extension. I think dumping the file into a web viewer in a FM layout might give you some insight.
Its a .csv . So if I put this link in a web viewer it opens the file and asks for me to save it in a location. That's great and all but this needs to be automated. Only way I see this working is I click a button, it opens another layout with the web viewer on it, nothing large, but the user is responsible for putting it in the correct location for the script to finish. I cant have that. Whats my options ?
I need it to open in the webviewer, the file save to a location I have preset and then the script would wipe the database, and reimport with the new .csv file with the fields mapped.
Why open it at all except to process it?
I think you're making this too hard.
How does INSERT FROM URL (GET) not work?
So how do I write this for the INSERT from URL ?
You are going to kick yourself when you see how simple it is.
1. create a field to be the target for the file dump
2. put it onto a layout
3. create a script or simply put a button onto the layout with the script step "Insert from URL"
4. Use the Insert from URL dialog box to enter the URL that you want to visit.
5. Save your work
6. In browse mode, press the button and, when the download is complete, copy the text from the field.
This is exactly what I did and I get connection failed.
If I change the file to a .zip file it works . It doesn't like the .csv . Running Filemaker 15 Advanced... Is this a bug ?
I'm not trying to copy text from my website. I'm just trying to download a .csv file and then import the .csv file into the database.