Søren Dyhr Posted July 2 Posted July 2 (edited) In the UX part of a webdirect solution I would have a container field, where if I drop a .csv file onto it, would have the file processed as a dialog free import to an internal table, as a goal for this solution. The nature of webdirect makes this process, a bit different pathwise ... and similar to PSOS'ing, if container fields are used, however this might be done with two container fields one being stored inside the file, and the other one being referenced - because the entry of a referenced container, creates a folder where the dropped file resides for further handling. Is this the way to deal with this, or could the .csv-file be inserted into a large textfield, provided a file never exceeded the 64K a textfield can hold? ... and what if the file sometimes exceeds this limit? --sd Edited July 2 by Søren Dyhr
comment Posted July 2 Posted July 2 I know very little about WebDirect, but I see that it supports importing a .csv file directly (except in mobile browsers) - so why not just do that? If you must go through a container field, then you still have the option of exporting the (embedded) container field's contents to the server's temporary folder, and importing from there. 1 hour ago, Søren Dyhr said: could the .csv-file be inserted into a large textfield, provided a file never exceeded the 64K a textfield can hold? First, a text field can hold up to 10 million characters. Not sure where you get the 64K limit from. https://support.claris.com/s/article/FileMaker-Pro-19-Technical-Limits?language=en_US Although the Data File script steps are not supported in WebDirect, you can read the text of a file embedded in a container field using the TextDecode() function. But how would that get you closer to your goal of importing the file's contents?
Søren Dyhr Posted July 2 Author Posted July 2 2 hours ago, comment said: But how would that get you closer to your goal of importing the file's contents? I'm already breaking it up from being delimited with semicolons instead of commas as the default .csv uses between fields. It done in a fm16 solution, being without the fancy import-mapping from version 19 and onwards... --sd
Ocean West Posted July 2 Posted July 2 If you upload a CSV into a container field (regular or global ) you can then use Base64Decode ( Base64Encode ( table::container ) ) In a script to set a text field. You can then iterate thru the contents in a script or use the file options to write out the file to document folder on server then import with PSOS. (forgot about the text decode function -probably ideal for that as @comment suggested )
Søren Dyhr Posted July 2 Author Posted July 2 (edited) 45 minutes ago, Ocean West said: (forgot about the text decode function -probably ideal for that as @comment suggested ) It is because I could pull this script off, and then get rid of all relative path matters on PSOS side of the matter: But thanks for the suggestions both of you! --sd Edited July 2 by Søren Dyhr
Ocean West Posted July 2 Posted July 2 WriteFile.fmp12 Importing is the fastest way create records records. I prefer to use this if you don't want to use BE plugin to export field contents
comment Posted July 2 Posted July 2 20 minutes ago, Ocean West said: use BE plugin to export field contents Ah. I forgot to mention that when I suggested exporting the field's contents on the server. 22 minutes ago, Ocean West said: I prefer to use this That won't work in version 16. The Data File script steps originated in version 18. 1
Søren Dyhr Posted July 3 Author Posted July 3 (edited) 8 hours ago, Ocean West said: Importing is the fastest way create records records. I prefer to use this if you don't want to use BE plugin to export field contents There is another problem, look how grayed out all the vital shenanigans looks if you turn on webdirect compatibility on in script editor: The issue here is that this client have been on a rented licensing for some years, now and have changed direction with what they need for their web shop and handling of the ticketing system I've been providing up until now. In the old system did we have a statistics module, taking care of when each ticket was used to get access, and who of the employees have have handled the check in. Now the new system does not provide these statistics yet, just a bulk export of all records with SQL timestamps to digest. I have then been asked to make a tiny tool to perform this task ... and low and behold - I can use the FM16 from my FDA license to make a runtime doing exactly this, without needing to turn to webdirect at all. --sd Edited July 3 by Søren Dyhr
Ocean West Posted July 3 Posted July 3 All of these functions were in regards to PSOS not WD but your on a legacy version - I would highly recommend clients to upgrade to the latest.
Søren Dyhr Posted July 3 Author Posted July 3 6 hours ago, Ocean West said: I would highly recommend clients to upgrade to the latest. There is a saying - that comes to mind: Quote if all you have is a hammer, everything looks like a nail ... which could mean that Filemaker as such is a niche tool, and aren't supposed to solve next to everything - Why should the client buy a tool that's not quite hits their targets? What I was hired to do for this client, was to remedy areas where their present webshop provider, haven't threaded yet ... now is it the same when they migrated to another webshop, which better deals with abstract products ... but now lacks "interpretation" elsewhere. These task could be done in ways that newer filemaker versions have depreciated ... Runtimes. I can make earnings with these small workarounds, and gets nothing out of recommending the client a new shining upgrade! --sd
Recommended Posts
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