Method Community

 

How to set a default value for a grid field

Last post 02-21-2011 11:19 AM by paulette. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 02-19-2011 8:42 AM

    How to set a default value for a grid field

     I know how to set the default value on a screen field but can't figure out how to do the same for a grid field.  Any assistance would be much appreciated.

    -Paulette

    Paulette Dreher
    SBS Associates, Inc.
    www.sbsassociates.com
  • 02-21-2011 8:34 AM In reply to

    Re: How to set a default value for a grid field

    Answer

    Hi Paulette,

    A grid is just a visual representation of the data from the table and by default, the grids are read-only. I assume that you have customized the grid to allow for editing and new entries directly on the grid (steps 5 & 6 of grid properties) and that is why you are asking for a default value.

    Unlike using fields on the screen, which can be customized to have a default value, this option does not currently exist for grid columns. Instead, we can trigger this with actions on another grid column. For example, put actions on the first grid column so that when a user makes a selection (or in some cases better to use loses focus) it will automatically enter values for other grid columns in that row.

    As a side note, in most cases when you click on the link to add new lines it provides rows for several new lines to be added. Imagine you had set up a default value for the grid column (even though it is not a possible option right now) but you only wanted to add 1 new line. Clicking ‘update’ on the grid will try to insert all rows as new records since there is new data in all of them. This might not be such a good idea and it could conflict if you had required or unique fields set up.

    Hope this helps,

    Need more help? Ask us about Method consulting services.

    Valbon Shabani
    Director of Education
    Method Integration Inc.
    Toll Free: 1.888.925.6238 ext. 715
    Local and overseas: 416.847.0400 ext. 715
    Fax: 416.640.6027
    E-mail: valbon@method.me
    Website: http://www.linkedin.com/in/valbon
  • 02-21-2011 11:19 AM In reply to

    Re: How to set a default value for a grid field

    Answer

     Thanks Val.  Makes perfect sense.

    Paulette Dreher
    SBS Associates, Inc.
    www.sbsassociates.com
Page 1 of 1 (3 items)