Method Community

 

questions about "current" row of a grid

Last post 02-19-2015 8:55 AM by Method_Justin. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 02-12-2015 2:01 AM

    questions about "current" row of a grid

    Hi,

    After working with Grid, I encountered several issues but not know if that is Method's bug or my incorrect actions.

    I'm working on "PurchaseOrderLine" Grid of Purchase order screen. Here are some questions:

    1. If a column is dropdown type, when I select a new value, only "Text change" event fired, "Select" event never triggered. Is this correct?

    2. If user change value in a "Dropdown" type column, how do I know (or how do I get ) the new value been selected? And, how do I know which row user is working on?

    3. For a grid which allows to be edit in place, in what condition "Action before Edit" and "Action after Edit" will be triggered? I tried to put show message for these event, but can not figure out the rule.

    4. For a grid which allows to add new line, in what condition "Action before add" and "Action after add" will be triggered? The same, I put show-message action for these two events, but nothing is fired.

    5. If I call "Insert new row into grid" action, how do I know row index of this new row? And, how can I set value to column of this new row? Can I use "Enter value into field of Screen"?

    6. For action "Assign value to action result", I can select "Value from screen" or "Value from Row". In both case, I can choose those column of a grid. The question is, which row is this column be retrieved from?

    7. For action to loop through a Grid, does it include new created rows? If it does, how do I know a row is new created? and how do I 

    8. if there is any document regading Grid? It seems that I can only search forum or do it trial-and-error.

    Thanks.


    --

    Alex

    Chief Architect
    Yi Systems, Inc.
    alexhuang@yisystems.com
    www.yisystems.com blogs.yisystems.com
    Software.Web.Cloud.IT
  • 02-16-2015 10:43 AM In reply to

    Re: questions about "current" row of a grid

    Answer

    Hi Alex,

    1. The Select event is used in non-editable grids. It makes the column into a clickable link, and runs the listed actions when that link is clicked. For example, in a non-editable grid you could have a Customer column and use the Select event to turn it into a link that shows that customer's details in a pop-up.

    2. Take a look at the Text Change event of the Item column on the stock Invoice screen's line item grid. We use the Retrieve Value From Table action to enter values into the same row when an item is selected.

    3. Both these actions are triggered when the Update link is clicked or the transaction record is saved. The Actions Before Edit event will trigger directly before the Update or Save function is called, whereas the Actions After Edit event will trigger directly after the Update or Save function is called.

    4. This should be the same as above, but for new line items (that do not yet exist and are being added) as opposed to current line items (that already exist and are being edited).

    5. This simply inserts a new blank row at the bottom of the grid, it's the same as clicking the New Line Item... link at the bottom of the grid. If you want to auto-populate certain columns here, I recommend doing so on the Text Change event of another column, such as is the case with the Item column in my response to question 2.

    6. The main difference here is that Value From Row only works inside a loop (Table or Grid), and Value From Screen for Grid:Columns only works within actions on the line level. For example, Value From Row will get the value from the current record of a loop, whereas Value From Screen (for a Grid:Column) will run on the line which it is triggered (if you select an Item on a grid line to trigger this, it will pull values from that same line).

    7. The Loop Through Grid action only runs for populated rows that have been committed to the grid. You'll have to click the Update link on the grid or Save the transaction before a row will be included in a Loop Through Grid.

    8. We do have a Help Center article about the Grid Object here. You may also be able to find other information you're looking for by searching there.

    Hope this helps.

    - Justin

    Justin Henderiks
    Technical Sales Specialist
    Method Integration Inc.
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400
    Fax: 416.640.6027
    E-mail: j.henderiks@method.me
  • 02-16-2015 4:56 PM In reply to

    Re: questions about "current" row of a grid

    Hi Justin,

    Thanks for reply. I appreciate. However, after testing with your suggestion, I still met some issues:

    Item (3), For a Grid with two rows (already in table), if I changes any column of these two row,  I expect that for every row, there is a "Action Before Edit" and "Action After Edit" triggered. However, it seems that just one "Action Before Edit" and one "Action After Edit" are triggered, is it correct? (same question to action before/after add.)

    Item (5), I understand that I can use "Text Change" to change other column. However, what I want to do is, whenever I add a new item line (not yet in table), I can enter value in some columns of this new item line, but not to ask users to click to show. Is it possible to do so?

    Thanks for your time.

    --

    Alex

    Chief Architect
    Yi Systems, Inc.
    alexhuang@yisystems.com
    www.yisystems.com blogs.yisystems.com
    Software.Web.Cloud.IT
  • 02-19-2015 8:55 AM In reply to

    Re: questions about "current" row of a grid

    Hi Alex,

    3) There is one action set for each of these events, when you Update or Save it will run each of those action sets once.

    5) There isn't a way to populate new, blank rows in a grid directly after they've been inserted. The user would have to interact with it somehow, and you could put some actions on the associated event. The only way to get pre-populated information into a new line on a grid would be to insert to the grid's table and refresh the grid, which if you're leaving out required fields would cause an error.

    I should ask, have you taken advantage of your free consulting hour? I think it would be a good opportunity for you to discuss your workflow with a member of our Professional Services team, a trained customization specialist that can provide you with some more advanced advice.

    - Justin

    Justin Henderiks
    Technical Sales Specialist
    Method Integration Inc.
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400
    Fax: 416.640.6027
    E-mail: j.henderiks@method.me
Page 1 of 1 (4 items)