1
0
-1

Is there a sample code for insert and update for spread sheet.

I have done Load but I am struggling with doing the Store with Update and insert Option. An example would be much appreciated. 


    CommentAdd your comment...

    3 answers

    1.  
      2
      1
      0

      Hi Bilal

      Found the following guides via Google that might help you. The BeanShell for FormGrid could be the same as for spreadsheet element. However if your spreadsheet has file or image attachment, it is best to use the default Multirow Form Binder: 

        CommentAdd your comment...
      1.  
        1
        0
        -1

        When Spreadsheet rows are retrieved It may have 3 rows the user can add 2 rows Add one 1 Row Update 1 and remove 1 Row. The Store would have to account for  all those actions in its logic. 


        The Case that I have there is a spread sheet which would be preloaded with 2 columns from Table 1 (AvailableItems)  with column Items and Price. The User can  add value to the of "quantity" in the spread sheet  to the table add / remove Items from the Table .When user save only suppose to save the selected list and in Table of order not AvailableItems. next time when user comes As there is record in Orders no need to auto populate from AvailableItems. Hence the need to BeanShell. I have done the logic of load and save , as mentioned struggling with the logic of update and delete as it needs a comparison with what was originally loaded. 


        I think this would be a really useful examples for others who want to use joget as a platform for overall knowledge base. 

        1. aimi

          Hi Bilal, May i know your solution for this issue?

        CommentAdd your comment...
      2.  
        1
        0
        -1

        Thanks  Matthew King The Issue with this example is is that this does not show how to handle Update and Insert in the same section , In specific how to Iterate the all the rows in Spreadsheet with update SQL.. An example for the above would be highly appreciated.

          CommentAdd your comment...