Importing a csv to livecloud from your app, and notes on importing CSV data - Printable Version +- LiveCloud Forums (https://forums.livecloud.io) +-- Forum: General (https://forums.livecloud.io/forumdisplay.php?fid=1) +--- Forum: General (https://forums.livecloud.io/forumdisplay.php?fid=3) +--- Thread: Importing a csv to livecloud from your app, and notes on importing CSV data (/showthread.php?tid=370) |
Importing a csv to livecloud from your app, and notes on importing CSV data - sid - 03-07-2020 Hi Everyone: First of all the CSV import in livecloud is an awesome feature. , Can you show us if its accessible via command or code to do from the client side app? For instance , take the contacts app example.. A client would want to import his own data into his clients app. It would also be cool to show how it can be done from a datagrid. A note for people using MSExcel 2010 to generate .csv files : It errors , but if you upload the file to google sheets and then download it as a csv..it works wonderfully. I'm not sure if its a purely 2010 excel version issue. Maybe later editions work. Sid RE: Importing a csv to livecloud from your app, and notes on importing CSV data - sid - 03-10-2020 Problem solved! Mark and Efrain have fixed the issue and the improved API will be released soon that will solve imports from MSexcel csv files For those of you needing do this in the meantime: you can replace the semicolon of the header line with comma and it will work. This should only be broken in the header (line 1 of the text file). - MSExcel exports their headers with semicolons instead of commas. This is not the standard. Well done on the quick response to my support request guys. Sid RE: Importing a csv to livecloud from your app, and notes on importing CSV data - mark_talluto - 03-11-2020 Hi Sid, We just pushed an update to LCM right now. You have a new function called cdb_importCSV(pTable, pTarget, pPath). The docs online have been updated with information on the new API: https://docs.livecloud.io/ImportCSV/ There are other useful fixes to LCM in this update as well. See the change logs for more details. RE: Importing a csv to livecloud from your app, and notes on importing CSV data - sid - 03-15-2020 (03-11-2020, 01:15 AM)mark_talluto Wrote: Hi Sid, Hi Mark, Thank you for this. Its a great feature and will be used extensively. Sid RE: Importing a csv to livecloud from your app, and notes on importing CSV data - mark_talluto - 03-15-2020 That is great to hear. Thanks for feedback. Unique record issue when Importing - sid - 04-17-2020 Hi Efrain and Mark I would like to request a small change on the csv import API. Its actaully the inclusion of a parameter to handle duplicates of records where you need to maintain a unique key . For example a barcode. 2 different items should not have the same barcode. So its pretty easy to check for duplicates withing the livecode form and not allow the user to create a new record with a unique key, or ask them if they just want to update the record rather than create it With the CSV import , it creates whatever records are in the CSV . Totally messes up your plans for keeping certain keys unique So this is want I propose: cdb_importCSV(pTable, pTarget, pPath, pUniqueKeys, pActionOnUnique) The 2 new things will be : pUniqueKeys and pActionOnUnique pActionOnUnique will be to either 'update' or 'ignore' if it is 'ignore', then the import will disregard the duplicates if it is ' update' it will update the keys of the existing records with whatever is in your csv if you leave the parameter blank, then it does what the csv import usually does pUniqueKeys will be the keys of whatever you don't want duplicated. For example "Barcode" If a user uses the 2 extra parameters then please throw the Updated and Ignored records into 2 seperate arrays we can access, so we can inform the user what records have been ignored or what has been updated This will be useful in a whole lot of scenarios , like importing data with ID numbers etc, you guys call them social security numbers, It is essential in accounting and stock software. Thanks Guys Sid RE: Importing a csv to livecloud from your app, and notes on importing CSV data - efrain.c - 04-18-2020 Hi Sid, This a useful request; however, we are not able to work on it in the short term. Currently our team is focused on pushing for a beta release of Appli. Our goal is to have this available by the end of summer. We will come back to the APIs soon after the beta release of Appli. I apologize if this is an inconvenience. If you'd like I can offer a work around for you in the meantime. Best, Efrain RE: Importing a csv to livecloud from your app, and notes on importing CSV data - sid - 04-18-2020 Hi Efrain Thanks man. I would really appreciate it if you can give us a workaround. a code example will be awesome Also getting a blob into a row in a datagrid...Im struggling with that. Good luck with the Appli beta. Thanks again for the assistance Sid |