Discussions

 View Only
  • 1.  Automation or WebHook to pull all records into one table

    Posted 10-03-2019 15:56
    I need to get a system in place which allows a single button press that pulls all the records with a designated box not checked into a report and changes all the dates to today.  

    It would be even better if it automatically creates a CSV file from this button as well based upon the selection criteria.

    I was trying to even think of where to start on something like this.  It could not be in the record itself so I was thinking a home page or maybe a code page that was linked to a button on a homepage.  

    Any help would be very appreciated!

    ------------------------------
    Thank you,

    Jeremy Cohen
    ------------------------------


  • 2.  RE: Automation or WebHook to pull all records into one table

    Posted 10-03-2019 16:28
    What are you trying to do with this system? Take records that are not completed yet and show them in a report so that people can then do something with them? Something similar?

    I can see a few possible ways to do this on the record itself without resorting to javascript I think, but it will depend on exactly what you want to do. Are you just wanting to see incomplete records from the previous day and have their date show as today if a checkbox isn't checked? That would be easy enough.

    How are your javascript skills? If someone helps you put in a javascript solution and it breaks in 2 months are you capable of fixing it yourself or would you need to hire someone to do that? Things to think about before moving to a coded solution. If you cannot fix it yourself then you will have some downtime which may or may not be okay in your specific case.


  • 3.  RE: Automation or WebHook to pull all records into one table

    Posted 10-03-2019 16:37
    Thank you for the reply Austin,

    I'm not looking to do a ton and it may be able to be done in another fashion. 

    There is a table for invoices which get processed and uploaded into another system.  The issue is that when these get processed I need to record the date on all of the records that are uploaded [Change a field from blank to today].  I really need a button that pulls them to a visual place which lists the information (A report would work fine which is already filtered to show anything that has not been processed) and then press a secondary button which adds today's date to all those records.

    I have been trucking along with most of my solutions up until here, this one has me stumped.  

    I know very basic javascript but even so this would eventually become something which I will not be interacting with to that level and someone else may be taking it from there.  The more intuitive it is the better it is.


    ------------------------------
    Jeremy Cohen
    ------------------------------



  • 4.  RE: Automation or WebHook to pull all records into one table

    Posted 10-03-2019 16:53
    Jeremy, are you looking for the code for a button you can push which will mass update all records on the report to today's date?

    if so you can make a saved table yo table import and map the record into itself merging on Record ID. 

    Then the the url formula button code button would look like this 

    var text URL = Urlroot() & "db/" & [_DBID your Table name here] & "?act=API_RunImport&ID=10;

    "javascript:" &
    "$.get('" & 
    $URL & 
    "',function(){" &
    "location.reload(true);" &
    "});" 
    & "void(0);"




    Post back with you formula if there are any syntax errors. 

    If you have application tokens enabled you will need to add in a line

    & "apptoken=Xxxxxxxxx. "


    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    markshnier2@gmail.com
    ------------------------------



  • 5.  RE: Automation or WebHook to pull all records into one table

    Posted 10-04-2019 12:34
    Hey Mark,

    Thank you for your response yesterday evening.  I have been playing with it here or there when I get time.

    I added, what I thought, was the formula to make this work all across the record but I think I am missing something.

    I created  a URL button that reads as followed:

    var text URL = URLRoot() & "db/" & [_DBID_PREVIOUS_INVOICES] &"?act=API_RunImport&ID=12";

    var text EDIT = URLRoot() & "db/" & [_DBID_PREVIOUS_INVOICES] & "?a=API_EditRecord"&

    "&_fid_55=" &Today()&
    "&_fid_53=" &true;

    "javascript:" &
    "$.get('" &
    $URL & $EDIT &
    "',function(){" &
    "location.reload(true);" &
    "});"
    & "void(0);"

    I was hoping this would go through every record ID on the table and change the record fields to today as well as the checkbox to "Checked".


    Please let me know what I am overlooking or not quite understanding.

    THANK YOU!


    ------------------------------
    Jeremy Cohen
    ------------------------------



  • 6.  RE: Automation or WebHook to pull all records into one table

    Posted 10-04-2019 12:52
    So you should stick to the syntax of my response.

    var text URL = URLRoot() & "db/" & [_DBID_PREVIOUS_INVOICES] &"?act=API_RunImport&ID=12";

    "javascript:" &
    "$.get('" &
    $URL & $EDIT &
    "',function(){" &
    "location.reload(true);" &
    "});"
    & "void(0);"

    The trick is that if you want a certain field mapped to be Today, then make a field called Today with a formula of Today() and in the saved table to table import, map that Today field into whatever fid 55 is called.  

    Similarly, if you want to make  field true (checked), then make formula boolean checkbox called perhaps [True] wth a formula of true.  Then map that field into whatever fid 53 is called

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    markshnier2@gmail.com
    ------------------------------



  • 7.  RE: Automation or WebHook to pull all records into one table

    Posted 10-07-2019 14:38
    ok, so I got this working great.

    Saw what you meant by mapping the fields and making sure the records are merged together.  Definitely a huge improvement and allows the user the ability to massively alter a bunch of records with standard information.

    Is there a way to redirect the user back to a home page or conversely take all the records that were altered and spit them into a CSV file that the user can save somewhere?

    Thank you guys so much for the help!

    ------------------------------
    Jeremy Cohen
    ------------------------------



  • 8.  RE: Automation or WebHook to pull all records into one table

    Posted 10-07-2019 16:39
    I'm travelling now, but even from Ireland I could see the light bulb light up in your head.  So that s great.
    You can use this syntax here to do do two successive actions.

    $URLONE
    & "&rdr=" & URLEncode($URLTWO)

    For URLTWO, this can be to land the user on any record, report or Dashboard page.  So you can make either a regular table report and instruct the user in the report description on how to export to Excel using MORE .. and save as spreadsheet , or else I suppose that you can actually make a table report, but there is a somewhat obscure option to format the report in CSV.  That will actually download a CSV.  I would personally find that "off-putting" but you could do that if it would not confuse your users.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    markshnier2@gmail.com
    ------------------------------