Forum Discussion

Re: Comparison between two tables and display the outcome on one column using the API_DoQuery

Thank you. I am developing an application that has five tables. An agent is has a one to many relationship to a float table where floats are transferred to agents and once the previous float has been cleared, they can get more, this data is input one by one therefore sending a corresponding value to the Reconciliation table. These agents do get customers and they can only where they sell tokens and get the money in return via Cash or Cheque and deposit into the bank. These types of deposits have been associated into two separate tables. The final table is the Reconciliation table that flags any float that has not been deposited onto the bank. Bank records are uploaded once every day from a spreadsheet into the Cash/ Cheque tables and should get the deposit amount into the Reconciliation table using the ImportFromCSV_API This should be matched with the date and reference number in the Reconciliation table to add the deposit amount. My challenge is it dumps all the records without matching any values in the Reconciliation table. There is no relationship between the Reconciliation and Banc/ Cheque tables respectively.

I have not applied any code but i am planning to use javascript and add the query to match the criteria. How can I apply this?

------------------------------
Daniel Othwolo
------------------------------

2 Replies

  • RyanStanford1's avatar
    RyanStanford1
    Qrew Captain
    I would have this as JS injected...

    The javascript compares the two sets of data, however you need them compared... then you compile a "csv" which can really just be JSON information in order, add a new line between items... and then that JSON can be the csv body of a upload_csv call to the column you want to update.

    It can be done, though if you don't know JavaScript... it could be a daunting task.

    ------------------------------
    Ryan Stanford
    ------------------------------
  • RyanStanford1's avatar
    RyanStanford1
    Qrew Captain
    Another option, depending on the relationships you already have... is have summary fields for Total Amount floated … compare it to a summary field of the consolidation amount... have the actual comparision field/column then be a simply calculation between the two... if the relationships are there you wouldn't have to use JS at all

    ------------------------------
    Ryan Stanford
    ------------------------------