How to group database records ?

Hi experts,

I have a use-case scenario, where I have to create NetSuite transaction(Vendor Bill) from the database rows. But in my use-case NetSuite transaction(Vendor Bill) is supposed to have multiple lines and those multiple lines will be the individual rows of the database.

So, I need in help in grouping the database rows for the creating of NetSuite transaction(Vendor Bill)  

Thanks in advance :)

0

Comments

4 comments
Date Votes
  • Thanks for posting this to the community, Chirag2006. If it's possible for you to sign up for an office hours session, one of our solution consultants can provide guidance.

    0
  • Hi Chirag Kumar Deo,
         If still have not found any solution, we need a few clarifications regarding your use case.

    Are you saving from your export you will getting more no. of rows as CSV but you want to group it couple od rows into one and import it into NetSuite vendor bills and expenses & items. is this right?

    If I'm not wrong there should be a unique key from ur multiple rows. let say if you have 5 rows, out of 5, 3 rows will be having the same unique key, and the remaining 2 rows will be having the same unique key.

    If this is the case, will having 2 approaches.
    1. on FTP export you should find "Multiple rows per record", please select and give the unique column name.
    2. You can write your own pre-save page hook functionality to handle this scenario.

    we prefer 1st option.
    Please let me know if my observation is wrong. and if possible please let me know how export is been configured.

    0
  • Hi Muneswara Thotakura

    Thanks for replying, I am using MS SQL as my export after running a query, I receive certain number of records. I wish to group the records based on a unique key, so that at the NetSuite Import, I get something like an items array that I can use in item mapping.

    I am currently facing an issue with grouping of the records coming from my export.

    Hope this helps you understand my use case.

      

    0
  • Hi Chirag Kumar Deo,
         If it was MS SQL, I think we can't make grouping through a query like an array of records until and unless it's a parent-child hierarchy.  

    If this is the case, you may need to build the two flows, for the grouping of records and importing into NetSuite.
    Flow 1: MS SQL to FTP as CSV
    Flow 2: FTP to NetSuite, here in the FTP you can use a grouping of records using a unique key.
    when you open the first flow, on the top right you will see a gear icon, click on it and add "Next integration flow" as Flow2.
    So that after every run of the first flow is completed, the second flow will trigger automatically.

     

    Maybe another option, we may need to divide into two tables as parent-child hierarchy and we can make a query, we can get an array of records as expected.

    and other options using code,  we can write a pre-save functionality hook on IO export to modify the export record as we like, based on a unique key we can form the array of objects.

    so the best option is FTP.

    0

Please sign in to leave a comment.

 

Didn't find what you were looking for?

New post