Method Community

 

Help understanding linked fields

Last post 06-22-2012 3:57 PM by Anonymous. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 06-22-2012 1:22 PM

    Help understanding linked fields

    Hi guys,

    I'm showing my coworker some things in Method, and I've realized that I misunderstand something about linked fields.

    To show her how to create a relationship between tables, I added a dropdown field in the Invoice table that linked to the Vendor table. Then, I added a linked field via that dropdown for the Vendor Phone Number.

    I added both the dropdown and vendor phone fields to the Invoice screen, with the understanding that when I selected a vendor from the dropdown, that vendor's phone number would populate the linked field. This did not happen.

    The linked field was grey, indicating it was not editable. However, when I created a "Retrieve value from table" action to update the value on the screen, the action was able to retrieve the phone # from the vendor table and stick it in the uneditable linked field.

    But what is the point of a linked field if it does not automatically retrieve the value? I could have just added a regular new field and used the same action set.

     

    -Sam

     

  • 06-22-2012 3:57 PM In reply to

    Re: Help understanding linked fields

    Answer

    I've got an older post that explains linking with an example that's quite good.

    Since there is no link to the Vendor table from Invoices by default, you'll need to create a link first.  Once you create that link then you can access the rest of the fields in the Vendor table.  Remember the initial link needs to be a unique field.

    Your Invoice screen would not automatically populate the VendorPhoneNumber after you selected a Vendor unless you create an action after you select the Vendor.

    smohyee:
    But what is the point of a linked field if it does not automatically retrieve the value?

    A linked field is exactly that, just a link to a field in another table.  Linked fields have no actions associated with them so selecting a Vendor on the Invoice screen and expecting the VendorPhoneNumber to populate will not happen - you will need to create an action to achieve this.  It doesn't sound like a linked field is what you need since you can just use a Retrieve Value From Table action on the Invoice screen itself.

    ~C

Page 1 of 1 (2 items)