Display field for Linked Froms?

Viewing 4 reply threads
  • Author
    Posts
  • May 19, 2021 at 8:37 AM #44442

    Kirk Williams
    Participant

    Apologies if this is basic, but I seem to keep getting tripped up with some of these “minor” UI details!

    I would like to specify the field displayed on the parent form of a one-to-many relationship. Here’s my (hopefully) simple example:

    Form 1 contains a list of “computers”
    Form 2 contains a list of “users”
    Form 3 contains a list of “networks”

    I need to associate a “user” with a “computer”. To do this, I’ve added a “Link to Form” field in the “computers” form, set it as one-to-many, selected the “users” form, and checked “Show inverse relationship”. After doing this, I am able to select a user record and modify its displayed fields from within an individual computer record.

    Now that the records are linked, I can see a “Link from form” field in the “users” form, and the relationship I just created is present. The problem is that the field displayed on the users form is just a numeric ID (leftover from SQL dump). I have not found any way to specify which field(s) from the “computers” form (which I presume to be the parent in this example) is shown.

    Ideally, I’d like it to display something more identifiable, like a “name” or “description”, however I’d really like the ability to choose dynamically. For example, I would also like to create a second relationship in which a computer is linked to a network… for that link, I may want to display different data in the “link from form” field, such as an IP address, MAC address, etc.

    I hope this is making sense. Thanks in advance for any guidance!

    May 19, 2021 at 11:18 AM #44444

    T.L. Ford
    Participant

    I have solved this in the past by creating a calculated field that includes the multiple fields I want to show, making it the first field, sorting by that, and letting it “be first in the list of fields”.

    May 19, 2021 at 8:38 PM #44448

    Brendan
    Keymaster

    Hi Kirk,

    The fields that are displayed on the inverse of a One to Many relationship are the same fields in the same order that you’ve specified on the parent form. So all you need to do is go to the parent form, rearrange the fields on the Fields tab and see what you get. You can also increase the number of fields that are displayed so that you get something more meaningful by clicking on the 1 to 5 buttons below the Single Column List View Fields option on the Form inspector panel.

    And yes, as TL Ford has mentioned, creating a calculation (or script) field will let you pick out individual fields from the parent form that could be displayed on the child form.

    Thanks,

    Brendan

    May 20, 2021 at 12:05 PM #44451

    Kirk Williams
    Participant

    Thank you both for the feedback!

    I was just able to produce the results you described. Rearranging the field order in the parent form so that the computer “Name” is before its “ID” field indeed propagates a recognizable output in the “link from form” display. I’m also familiar with the concatenation methods for calculated fields, so I can certainly appreciate your suggestions of using that in this scenario.

    If my understanding is correct, the first field of the parent (plus subsequent additional display fields) are my only option for this display… is that accurate? Essentially, I now see that I CAN manipulate which field is shown for the “user” relationship, however, it seems it would not be possible for me to display a DIFFERENT field for the second “network” relationship (???)

    Not to say that’s any kind of deal-breaker; I’m just trying to confirm my understanding of the process.

    Thanks again!

    -Kirk

    May 21, 2021 at 2:26 AM #44457

    Brendan
    Keymaster

    That’s right. It can’t be different than what’s displayed on the form itself that you’re linking to.

Viewing 4 reply threads

You must be logged in to reply to this topic.