Method Community

 

Update Grid Action

Last post 04-11-2013 4:30 PM by Method_Jason. 22 replies.
Page 1 of 2 (23 items) 1 2 Next >
Sort Posts: Previous Next
  • 08-04-2011 3:33 PM

    • jnoneiliv1
    • Top 50 Contributor
    • Joined on 05-17-2010
    • Richmond, Virginia, USA
    • Posts 171

    Update Grid Action

    I cannot find an Action that exactly duplicates the function of the "Update" link that is automatically provided underneath the bottom right hand corner of a Grid.

    I have tried the Action "Refresh Grid", but it does not save the cell contents.  I have tried "Save Grid" row as the first action in a sequence then the Action "Refresh Grid", but the cell contents are lost again.  I have not tried inserting some kind of a delay between these two actions to see if there is a race condition fault in the logic of the sequence.

    The Update link appears to do some things that none of the available actions will do, at least singularly, or I've got the wrong actions.

    When I am entering line items to a sales order, I am using the Update link to calculate some custom fields and to update the Amount field which is totalled by the database or QB.  I also need the Update link to enable a Link cell in the Grid which performs an action sequence.

    I can train my users to always click the update link, but I would like to incorporate an Action or series of Actions that does the same thing in one of my Lose Focus events such that multiple lines are entered more efficiently.

    What's the best way to do this?

    James ONeil
    O. K. Foundry Co., Inc.
    1005 Commerce Rd.
    Richmond, Virginia 23224
  • 08-05-2011 8:03 AM In reply to

    Re: Update Grid Action

    Hi jnoeiliv1,

    I am not 100% clear on what you are trying to do. At the very minimum when you click Update, it saves the grid and refresh it. Those action you put in the Update can be placed in one of the cells in the grid in the lose focus (Main difference is that it would be outside of a loop). Also to note, any time there is a Save and the Update on the grid has actions those actions should be called even without clicking Update.

    -Michael

    Michael Melo
    Product Manager
    Method Integration Inc.
    Website: http://www.method.me
    LinkedIn: http://www.linkedin.com/in/MichaelMelo
  • 08-07-2011 12:26 PM In reply to

    • jnoneiliv1
    • Top 50 Contributor
    • Joined on 05-17-2010
    • Richmond, Virginia, USA
    • Posts 171

    Re: Update Grid Action

    Michael,

    I am trying to duplicate the function of the Update link without requiring the user to Click the link while entering line items on an order.  I am trying to use the Lose Focus event trigered when the user Tabs accross the cells of the line item.  I need the current grid row to save and update the grid to show the total Amount of the line and to activate a custom Link used to insert a new row with contents based on the currently entered row.  Ideally the user could enter multiple line items without leaving the keyboard to grab the mouse and click the Update and Insert New Line Item links.

    Not that it's really necessary to accomplish what I'm trying to do, but I don't really understand what you're saying about actions tied to the Update event.  I cannot find the Update event.  The Update link is not a user added event, it is hard coded into the grid object itself.

    I can only guess that the Update link calls the "Actions After Edit" event as I don't see how else this event could be called, except for the Save actions you mention.  What events trigger the Update, and where is the user editable action sequence for this?

    The event "Actions Before Edit" is also a mystery to me as I can find no "edit" link in the grid for Sales Order Line items, although it is clear where the action sequence could be customized.

    Putting the mystery of the Update event aside, I have tried using the Save Grid Row event tied to a Lose Focus Event to save the current row and then using Refresh Grid to simulate the function of the Update link.  Save Grid Row does not work.  I am guessing that Save Grid Row does not work from within an active edit session.  While entering a new line item there is a status at the bottom of the Grid that says "Insert new record in progress".  This message does not change when Save Grid Row is called.  I know that the Lose Focus event is triggered and presumably the Action Save Grid Row since I used a message after Save Grid Row with a Yes/No confirmation.  After the message the Refresh Grid Action is called which ERASES the grid row being edited.  I assume this means the Save Grid Row Action did not work.

    I have not tested using a more global save action like Save Section, or Save All Sections, etc., which might work, but I wanted something more efficient  if possible.

    I'll continue to characterize the other Save type actions to try to find one that works.  I really could use some decent documentation of the events and actions in this system.

     

    James ONeil
    O. K. Foundry Co., Inc.
    1005 Commerce Rd.
    Richmond, Virginia 23224
  • 08-07-2011 12:34 PM In reply to

    • jnoneiliv1
    • Top 50 Contributor
    • Joined on 05-17-2010
    • Richmond, Virginia, USA
    • Posts 171

    Re: Update Grid Action

    Update.

    Using Save Section works.  I would think that Save Grid Row might be more efficient, but it just might be necessary to shut down the entire Grid edit session to get the row and grid to save.

     

    James ONeil
    O. K. Foundry Co., Inc.
    1005 Commerce Rd.
    Richmond, Virginia 23224
  • 08-07-2011 1:08 PM In reply to

    • jnoneiliv1
    • Top 50 Contributor
    • Joined on 05-17-2010
    • Richmond, Virginia, USA
    • Posts 171

    Re: Update Grid Action

    But.......

    Save Section works well when tied to a Lose Focus event to save the current row in the grid, which will update the Amount column and activate custom links in the grid, but using Insert New Row after Save Section in the action sequence does NOT work.

    It looks like Save Section is not properly implemented and the Action Sequence plows ahead regardless of the completion status of the Save Section action.  I've further characterized this by using a Show Message Action.  The Show Message Action also executes prior to completion of the Save Section Action resulting in an error in the Show Message and some hung widgets on the screen.  After the message window is closed the Save Section Action will complete and the screen widgets fix themselves.

    We call this a race condition, when successful logic depends on the speed of execution.  I expect if I put a few seconds delay between Save Section and the next event, all would be fine as the screen widgets would sort themselves out in time for the next action.

    This should really be fixed as the completion status of Save Section is not correctly implemented by the developer.  I think they assumed this action would always be called last, and in most cases it would.

    Or, the Save Grid Row Action could be fixed............it would really be great to use it as a way to automatically update a grid row during entry based on user definable critieria in an action sequence.

    James ONeil
    O. K. Foundry Co., Inc.
    1005 Commerce Rd.
    Richmond, Virginia 23224
  • 08-08-2011 10:02 AM In reply to

    Re: Update Grid Action

    jnoneiliv1,

    I am going to need to test this out further but from what I have tested so far, Save Grid Row may not be working properly and I was able to duplicate the issue you mentioned with adding more grid rows after a save.

    -Michael

    Michael Melo
    Product Manager
    Method Integration Inc.
    Website: http://www.method.me
    LinkedIn: http://www.linkedin.com/in/MichaelMelo
  • 08-08-2011 11:17 AM In reply to

    • jnoneiliv1
    • Top 50 Contributor
    • Joined on 05-17-2010
    • Richmond, Virginia, USA
    • Posts 171

    Re: Update Grid Action

    Thanks Michael!  It's such a relief that this can be duplicated.  I really don't think this Action is working properly and the more I worked with Grid automation, the more I wished I had this action to use.

    I think there is also a race condition problem with Save Section, which would be the workaround to this kind of automation, but if Save Grid Row works, I can live without Save Section working 100% as I can create artificial delays in my action sequences to make sure it completes before starting another action.  Most of the time it is not a problem as it used at the end of the Action Sequence and only followed by something like Insert New Row, which only mininimally requires completion.  For example a Sales Order header must be saved before a new line can be added to the Sales Order Grid of Line Items.

    You may not be able to see the problem with Save Section unless you can duplicate a delay in the browser or server due to slow browser/PC/or internet connection.

    James ONeil
    O. K. Foundry Co., Inc.
    1005 Commerce Rd.
    Richmond, Virginia 23224
  • 09-13-2011 3:13 PM In reply to

    Re: Update Grid Action

    Answer

    jnoneiliv1,

    To update this thread, Save Grid Row was actually created for use with our old grids before we updated to the current style of grids. This action will eventually be updated to be Save Grid to save a grid as a whole.

    -Michael

    Michael Melo
    Product Manager
    Method Integration Inc.
    Website: http://www.method.me
    LinkedIn: http://www.linkedin.com/in/MichaelMelo
  • 09-13-2011 4:39 PM In reply to

    • jnoneiliv1
    • Top 50 Contributor
    • Joined on 05-17-2010
    • Richmond, Virginia, USA
    • Posts 171

    Re: Update Grid Action

    Michael,

    Thanks for the update.  This should work also.  I'm still curious as to how the functionality of the Update link automatically provided at the bottom of the Grid is simulated in an action sequence.  Maybe this new version of Save Grid Row will do this?

    I am also getting weird calculation results for some cells in the grid where a cell like Total Weight will sometimes not update with the calculated result until AFTER the grid is updated and the calculation sequence is re-initiated.  Again, only sometimes.  There is something wonky in the grid.

    Cheers,

    James

     

     

     

    James ONeil
    O. K. Foundry Co., Inc.
    1005 Commerce Rd.
    Richmond, Virginia 23224
  • 09-13-2011 4:56 PM In reply to

    Re: Update Grid Action

    James-

    We have been made aware of some of the 'wonky' things happening on the grids and our next publish should address these.

    -Michael

    Michael Melo
    Product Manager
    Method Integration Inc.
    Website: http://www.method.me
    LinkedIn: http://www.linkedin.com/in/MichaelMelo
  • 09-14-2011 8:35 AM In reply to

    • jnoneiliv1
    • Top 50 Contributor
    • Joined on 05-17-2010
    • Richmond, Virginia, USA
    • Posts 171

    Re: Update Grid Action

    Thanks, that's great news.

    James ONeil
    O. K. Foundry Co., Inc.
    1005 Commerce Rd.
    Richmond, Virginia 23224
  • 04-09-2013 2:48 PM In reply to

    • JohnnyW
    • Top 200 Contributor
    • Joined on 01-18-2013
    • Beaumont, TX
    • Posts 21

    Re: Update Grid Action

    Does anyone know if there has been any documentation released on how the Update button on the grid works. I'm working with grids now, and I've found that in most cases, I would rather control the updating of the grid myself, rather than let the user press the update button. So I guess I have two questions:

    1) Is there any way to hide or disable the Update button?

    2) Is there any documentation on exactly what the update button is doing?

    Thanks!

  • 04-09-2013 3:10 PM In reply to

    • jnoneiliv1
    • Top 50 Contributor
    • Joined on 05-17-2010
    • Richmond, Virginia, USA
    • Posts 171

    Re: Update Grid Action

    Down the rabbit hole you go.  I think I gave up on trying to use grid update in Actions.  I couldn't get it to work.  I either had to have the user do it by the button or have the action sequence save all sections.

    Good luck.  I'd be glad to know how this works out.  I have a clickable link within a button that does some calculations for pricing but that link is not active until the grid is updated.  I could not get this to work programatically reliably using anything less than save all sections, or maybe save section, but not the action button for grid update.  Or, I might not remember correctly, but I know I couldn't get it to work and it's because that functionality did not work as documented.

    Cheers,

    James

    James ONeil
    O. K. Foundry Co., Inc.
    1005 Commerce Rd.
    Richmond, Virginia 23224
  • 04-10-2013 3:34 PM In reply to

    Re: Update Grid Action

    Johnny, 

    There hasn't been any documentation released on the Update button in an editable grid. This link is not customizable as it is hard coded into the grid. The only way to hide this link is if you choose Do not allow editing of rows on Step 5 of 9 of the Grid Wizard. Does this help?

    James, 

    I believe the Update link is simply a Save Grid action and a Refresh Grid action. 

    - Jason

    Need more help? Ask us about Method consulting services

    Jason Masina
    Community Support Specialist
    Method Integration Inc.
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400
    Fax: 416.640.6027
    E-mail: j.masina@methodintegration.com
  • 04-10-2013 9:13 PM In reply to

    • JohnnyW
    • Top 200 Contributor
    • Joined on 01-18-2013
    • Beaumont, TX
    • Posts 21

    Re: Update Grid Action

    Jason,

    Thanks for the response. That brings up another question...

    Is it possible to dynamically change the ability to edit rows based on user or role? Or would this require a completely new grid?

Page 1 of 2 (23 items) 1 2 Next >