Establishing Parent-Child Relationships or References in AppSheet

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024
  • How to create references between two tables in AppSheet. References in AppSheet start by creating a reference column in a child table that stores the parent record's ID reference. This is also known as a one to many relationship. Once established app developers can create inline views to show child records while viewing the parent record.

ความคิดเห็น • 9

  • @alessandroscimone5463
    @alessandroscimone5463 2 ปีที่แล้ว

    good! all very clear, useful

  • @JohnDoe-ys7bh
    @JohnDoe-ys7bh ปีที่แล้ว

    Hello sir. Is there a way for two separate rows in (EXAMPLE TABLE 1) to reference information from 1 row on (EXAMPLE TABLE 2.) Instead of having two parent tables, there are two parent rows instead?

    • @appify
      @appify  ปีที่แล้ว

      To better answer this question what are you trying to accomplish? Are you looking to display data in inline table? or display concatenated values in a field?

    • @HM-sx6mg
      @HM-sx6mg ปีที่แล้ว

      I would like to track the relationship between dogs at a doggy daycare.
      The first table has the dogs listed the following columns - name, breed, color, sex and a Unique ID -
      The second table is for the relationship between the dogs. The columns are - UniqueID, Dog A (ref to dogs table) Dog B (ref to dogs table), and type (a enum that has three choice of FRIENDS, NEUTRAL, AGGRESSIVE)
      How can I make it so that I Create a relationship row from Dog A to Dog B that is stored in the relationship table, in a way so that the relationship is visible from Dog A and Dog B profiles.

    • @appify
      @appify  ปีที่แล้ว

      As you suggested yes you will need a relationship table to store the relationships between two dogs. To get these to show up in the Dog A and Dog B profiles you will need to manually create the inline table to show these relationships.
      An inline table in AppSheet is simply a virtual column with a list of record IDs. You can manually create this for the dog table. You can create a virtual column in your main Dog table that has a formula that looks like this:
      select(Relationships[Relationship ID],
      or( [Dog A] =[_thisrow].[Dog ID], [Dog B]=[_thisrow].[Dog ID])
      )
      This formula looks in the Relationships table and gets a list of Relationship IDs where Dog A or Dog B are the record in the Dogs table. The result of the formula is a list of Relationship IDs that will display an inline table for each Dog.
      Let me know if this helps. This may be a good video topic to create.

  • @Randommomentsblr
    @Randommomentsblr 5 หลายเดือนก่อน

    Post doing all this, the ref values in child table are not reflecting correctly and it shows a random number/id instead of actual value.
    Example : I have vehicle number in parent table which i want this in parent table and im adding , vehicle number- IN-0099, but child table shows me vehicle number as 71eff8ec
    Kindly suggest what im i missing here

    • @appify
      @appify  5 หลายเดือนก่อน

      Is the column set to a list type?

    • @Randommomentsblr
      @Randommomentsblr 5 หลายเดือนก่อน

      @@appify There is no option as such

    • @Randommomentsblr
      @Randommomentsblr 5 หลายเดือนก่อน

      Any update?