Forum Discussion
AustinK
6 years agoQrew Commander
Just so I understand a little better, do you have any code that you are already using? I'm not even 100% sure what you are doing from your explanation.
One thing I was thinking is, do you need to do this via code or have you tried a native solution? If you need 2 tables data sent to a single table that is easy and you can then do whatever calculations or comparisons you want. You just need to use relationships and have the 2 tables be parents and have one child table where you lookup fields to. Unless I am misunderstanding what you are wanting to do here?
One thing I was thinking is, do you need to do this via code or have you tried a native solution? If you need 2 tables data sent to a single table that is easy and you can then do whatever calculations or comparisons you want. You just need to use relationships and have the 2 tables be parents and have one child table where you lookup fields to. Unless I am misunderstanding what you are wanting to do here?
DanielOthwolo
6 years agoQrew Member
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
------------------------------
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
------------------------------
- RyanStanford16 years agoQrew CaptainI 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
------------------------------ - RyanStanford16 years agoQrew CaptainAnother 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
------------------------------