Forum Discussion

eduardoeduardo's avatar
eduardoeduardo
Qrew Trainee
11 years ago

NEED TO MANIPULATE CSV FILE PRIOR TO IMPORT

Hope dandiebolt wins the Hawaii trip. Maybe next one to Brazil. Think I am one of the few Brazilian happy quickbase customers....

My company imports 4 CSV files, regularly (Daily basis) to One table. We have to import to excel, format columns (Brazil uses Date format DDMMYYYY, and NUMBER 123.456,78), Add one column to create a [UNIQUE] field, add one column to create a [Related other table field], rename de headings, export to CSV, import to quick base.

Time consuming and prone to errors (a lot), though easy to detect and reimport.

One CSV, is comma separated, other is tab separated and two are ?;? separated

Information is similar, but Headings are different (one of them has no headings), some have extra information that is not needed, one uses decimal numbers using ?,? the others use ?.?.

Implemented successfully dandiebolt idea: HTML5 file reader, Parse with d3 which creates an Object :csv , Do a map of csv, which creates an ARRAY?? Csv_Blob, that can be imported using the API_ImportFromCSV.

Now I am trying to learn: How to manipulate CSV_Blob (Array), prior to importing, or csv (OBJECT) prior to _map. Seems that underscore library has powerful tools to do that. It must be simple if you understand (which I am trying) arrays, objects, propriety?s, strings etc., cause from what I have read underscores deals directly with this creepy things.

What I have accomplished (more o less)

1. - I can parse the file reader output with D3.js selecting different separators (tab, ?,?, ?;? other). That?s fine!!

2. - D3.js can manipulate date and number formats of the propriety?s of each objet. I was not able to correctly format Number 123456.00 to 123.456,00 and Date YYYYMMDD to DDMMYYYY (something related to iso xx which seems I have to buy to now the correct code). What I did is transform the data directly in quick base (creating a formula text, and a formula number to cover all possibilities). It is working.

What I have not (still studying) and wishing some hints to make easier my process

1.- Create two new columns (Excel way).

Think this can be done in csv object prior to map, or in csv_blob Array prior to importing. My understanding is I need to create 2 new propriety?s, in all the Objects included in the csv_blob array. Must be a direct underscore snippet that I haven?t found or understand.

Lets say:

Before [{Name: xx, Phone: 123}, {Name: yy, Phone: 456}......]

After [[{Name: xx, Phone: 123, Newcol1: to_be 1, Newcol2: to_be 2}, {Name: yy, Phone: 456, Newcol1: to_be 1.1, Newcol2: to_be 2.1 }...]

2.- Automatically fill the values side of that propriety?s across the entire ARRAY, with two rules:

Rule number one: New propriety must be a string resulting of concatenating two other propriety?s:

Lets say [{Name: xx, Phone: 123, Newcol1: ?xx?+?123?}, {[{Name: yy, Phone: 456, Newcol1: ?yy?+?456?}...]

This creates a UNIQUE field in my configuration, and avoids duplicate records

Rule number two: Upon selection of a Button (think there are some ideas of how to do that in the community), some variable takes a value var Button.

This value must go in all objects of the array in the newly created propriety

Lets say say [{Name: xx, Phone: 123, Newcol1: ?xx?+?123?, Newcol2: var button}, {[{Name: yy, Phone: 456, Newcol1: ?yy?+?456?, Newcol2: var button}...]

3.- Thus there are different rules and different type of csv files I must implement a kind of button selection (do this or do that). What I am using now is have the snippets in different quick base code pages, and create a dashboard, with web url to those pages for simplicity.

Long question (sorry)

Appreciate some guidance

37 Replies

  • Hi, I'm from Brazil too, I've never used Dan's techniques (they sound fantastic) but they are out of my level ( I don't know programming).
    I'm thinking of giving up quickbase after 3 years without seeing advances in the internationalization or use advanced mobile features (as we are a construction company I need offline access).
    Today we do many routines in Excel to be able to import the bank information and boletos, which generates many human mistakes and loss of time.
    I am studying migrating to windev / webdev and starting from scratch. I would like to know your experience and perspectives. please contact me at martin@mirantesdalagoa.com.br
    • _anomDiebolt_'s avatar
      _anomDiebolt_
      Qrew Elite
      Brazil is the next big QuickBase market and I am going to personally come down there and work with you guys to prospect and hold a QuickBase user conference where we feature only topics that can't be done naively or that users don't know how to do natively.

      We are going to have to work on our branding. My current thinking is that is a toss up between the original "Mas Que Nada" (No Way inEnglish) theme and the Capacitar (Empower in English) theme. And we may have to substitute Lua (Lua was developedd at Pontifical Catholic University of Rio de Janeiro, in Brazil.) instead of Haskell as the official programming language.

      I am going to contact QuickBase marketing and see if they will thrown in some swag like pens, USB cables or t-shirts to support these efforts.

      Think big:





    • _anomDiebolt_'s avatar
      _anomDiebolt_
      Qrew Elite
      I encourage you to stick with QuickBase. It is less expensive than other enterprise solutions, vastly more customizable and more importantly I think you would be greatly underestimating the effort to recreate your accumulated work of the last three years in a new technology. Every product has gaps in its feature set and you will likely just discover new gaps in these other technologies.

      Regarding your two issues (1) internationalization and (2) mobile, I had the following comments.

      A final solution for internationalization will have to come from QuickBase and when the technology they select is in place, the capability will rapidly expand to many languages as fast as translation sets can be created - this is usually done by contractors who specialize in internationalization. I have no idea where this stands in their planning pipeline. However, in the meantime there are a number of things that can be done now to make the product more useful to non-English users. Feel free to contact me off-world for details. Also, I would encourage you to dialog with the other Brazilian users as I am totally serious about developing Brazil's usage of QuickBase.

      Regarding mobile, QuickBase is making improvements in their mobile offering. Again I have no knowledge of their product plans. However, there is a bundle of technology that goes by the name of PWA (Progressive Web Applications) that holds great promise to bring the features of installed native applications to web based applications. One technology that provides these new capabilities is called Service Workers and all browsers manufactures have adopted it (Apple the last holdout to release SW in upcoming Safari 11.1). In the other browsers (Chrome, FireFox, Opera, Edge, UC Browser, Samsung Browser) Service Worker technology is available now and you can do things such as offline usage of QuickBase, notifications, add to home screen.

      I work with these technologies in my non-QuickBase work and I can tell you for a fact that as 2018 rolls out there are massive implications for using these and other technologies with QuickBase
    • eduardovaldes's avatar
      eduardovaldes
      Qrew Member
      Martin j� somos 3 interessados em quickbase en Brazil!!!! Um grande avan�o!!!

      We are three known quickbase users in Brazil! Great advance!.

      I regularly import bank statements (using the ofx) and do consolidations. I use Quick as mi financial erp( needs to improve but it works).
      The code was hacked from dans ideas . I am sure it can be improved a lot but it works.
      Once I shared my code with him and said it was a piece of ....... kkkkkk
      Every 5 minutes quickbase syncs with my store system ( they provided a web service and I make a call with an automation) also hacked from one of dans ideas.

      I am connected to umbounce , twillio. Zendesk and typeform.

      I can share with you this dans ideas . He certainly shares though for more complex things he has a life as consultant .

      My wife has a production company and is encouraging me to try an become a developer to bring quickbase to Brazil. We even spoke with March Schneider which is a native quickbase developer

      We spoke with SEBRAE, cause we have some contacts there and where thrilled but spoke about the language problem.

      The idea in Sebrae was to create a tool for cultural production companies, they are small and lack of tools. And share with users individually. Giving access to complex tools to small companies

      She can certainly organize a conference cause he organizes events concerts etc.

      We can think big but we can do something smaller.

      Maybe search for more Brazilian users, and crowd-fund dans trip to Brazil.

      If I where quickbase I would certainly collaborate with that crowd-fund.

      There we coudl focus in ways to overcome quickbase setbacks for a Brazilian users and learn a couple of things.

      CAIPACITAR is a good name cause is the key of success to quickbase adoption from my point of view.

      I will call you later today.

      I see you live in NATAL I live in SALVADOR.
      Northeast to quickbase power!!!