Method Community

 

Add object options for a screen

Last post 10-24-2008 9:36 AM by Method_Valbon. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-14-2008 2:24 PM

    Add object options for a screen

    When adding an object such as a text box to a screen. What is the data relationship between that object and the screen or underlying table?

    I want to add a notes field to the invoice screen. I understand I can add the field to the Invoice table and then add the field. Just wondering what the purpose of the other objects are and is there a recommended process.

  • 10-24-2008 9:36 AM In reply to

    Re: Add object options for a screen

    Great question and it’s important to note the difference between the two.

    When a field is added to a table it is automatically bound to a record in the table. As a result, any save action will automatically save the contents of this field to the database while other actions such as “Set Active Record ID” will automatically populate the fields from the table. Objects differ in that they are unbound and have nothing automatic about them. Any data that is entered or saved must be defined by you through the use of actions.

    Example:

    Say you had a field in a table called Duration.  You want to have this calculated via Start Time and End Time, but you don’t want to store the Start Time and End Time - it is for calculations only.   Here you would put a Start Time textbox object and End Time textbox object on the screen, and on the Lose Focus Event of the End Time you could have a (1) DateDiff action to get the difference, in minutes, between the start and stop, and (2) Enter Value Into Field On Screen action that would put the result into the Duration field.

    You can distinguish the two further from the Toolbox within the design screen. The Add Fields section will list the fields directly from the table and allows each field to be added to the screen only once. The Add Objects section will list all objects allowing each to be added to the screen multiple times.

    As a side note, we’re in the process of finalizing our customization documentation which will include Objects and Actions, along with descriptions for each. Keep an eye open for this on our Method website.

    I hope that 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
Page 1 of 1 (2 items)