0

n:m | Ansicht mit Direktreferenz auf Child-Tabelle und Info aus der Brückentabelle

Hallo zusammen, 

folgende Herausforderung heute: 
Ich habe eine simple Datenbank mit Softwaretools in der Tabelle "Objekte". z.Bsp. Zapier, Asana, Sharepoint, Mailingtool, Formulartool, Emailvorlagen etc. Mit Zapier habe ich lange Prozessketten erstellt. Damit ich den überblick behalte sind "Objekte" per n:m mit sich selbst verknüpft. Funktioniert soweit ähnlich wie eine Beispiel n:m Datenbank. 

Damit man nicht viel klicken muss um zum nachfolgenden (Child-)Tool zu kommen, ist die Brückentabelle ausgeblendet und als Tabellenansicht mit "select Brückentabelle.BeziehungB" eingebaut. So öffnet sich der Child-Datensatz direkt.

Problem für mich: Ich habe der Beziehung in der n:m Tabelle ein Merkmal (Auswahlfeld) mitgegeben, welches nun nicht mehr in der Child-Tabellenansicht dargestellt werden kann, WENN noch andere Datensätze (Objekte) eine Beziehung zu dem Child-Datensatz haben. first(...) und last(...) funktionieren ja nicht weil der Treffer zufällig je nach Reihenfolge wäre. 

Einerseits möchte ich in der Ansicht direkt auf die Zieltabelle referenzieren, damit man nur 1x klicken muss, andererseits möchte ich ein Feld aus der Brückentabelle in der Tabellenansicht darstellen. Geht das? Habe ich das verständlich erklärt? 

6 Antworten

null
    • Fred
    • vor 5 Tagen
    • Gemeldet - anzeigen

    can you provide a sample DB?

    • Rainer_Wulbeck
    • vor 3 Tagen
    • Gemeldet - anzeigen

    Hi, 
    it's a shame. I cannot provide a sample db, cause I only have a standard-license. 
    I understand maybe it's not possible to answer, because you have to see it. 
    I will have a look to provide some pictures and code. 

    • Rainer_Wulbeck
    • vor 2 Tagen
    • Gemeldet - anzeigen

    Here is my sample Database. In the first movies-table, you see my question in red letters above the relevant view.  

      • Fred
      • vor 2 Tagen
      • Gemeldet - anzeigen

      I'm not sure what you mean by:

      This is what I want: Direct opening of the Actors, but showing the correct rolle of the actual movie

      Since Besetzung is a child of Actors, when you open a record in Actors you will always see a table to Besetzung showing all parts that the actor has been in.

      Opening the record to Besetzung shows you the Actor and roll related to the Movie. Then you can click on the Actor's name to see more info.

      Can you modify the Besetzung table to better fit what you want?

    • Rainer_Wulbeck
    • gestern
    • Gemeldet - anzeigen

    Thank you Fred, for your answer. I totally agree with the difference you discribe. But that's not the point. I try to explain: in the movies-page I would like to put only a view to the actors (for speed-reasons - no twice-klicks to open an actor). I don't want to open the n:m table. 
    Nevertheless I want to show the "Rolle/Besetzung" in the same line of the view - like in the n:m-Table. But thats not possible, when there are more than one relation. Here a drawing:

      • Fred
      • gestern
      • Gemeldet - anzeigen

      I get it now.

      You are running into the issue that you lose access to the current record when you are in a view element. There is no way to reference the info from the Movie record in the view element.

      I can think of three ways to solve it. I'm sure someone else can come up with another way.

      1) Is to use a HTML table and the urlOf() command to link to another table. See the attached DB to see how it works. It is not as clean as it opens the table as well so when you close the record you are not back at your original record.

      2) you can use a dashboard to view the data. Since a dashboard always only has 1 record you can use the record() command to get the record and then you can access the data in your view elements. I use this a lot. So you would have a field where you select the Movie. Now you know which movie you selected with the record() command.

      3) the use of Ninext, not fully supported in Ninox. It has a feature called onSelect() that allows you to use a view element but redirect where it takes you when you click on it. I use it but I understand if you don't want to.