Add number to items in 1:n

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • boris
    Junior Member
    • Apr 2019
    • 21

    Add number to items in 1:n

    Dear forum,
    I have some kind of artisitc blockade and hope someone can help me. Background: We are a group of voluteers planting small forests and we are using Espo as central platform for our acitivities.
    I want to create a documentation what has been planted on which plot with Espo. Some kind of list of alle tress planted in the forest.

    I have one entity "Setzlinge" describing the trees (oak, acorn, beech ...) and one entity "Pflanzliste", which should consist of all trees planted in aon specifc forest. Both have a 1:n relation, so adding the sort of trees is no problem, only the amount in each forest is the problem.
    Click image for larger version

Name:	thumb_13899.jpg
Views:	25
Size:	3.7 KB
ID:	116663
    I already bought the sales-extension, because quotes are some kind of similar (you have one quote where you can add products in specific amounts). But I have the feeling to start with the qoute extension and modify it is a little bit of overkill.

    Is there a more simple way to add an amount/number to a related entity?

    Does someone have a hint/description/idea which pushes me in the right direction?

    Many thanks
    Boris
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1655

    #2
    Hi, your screenshots are not recognizable, too small.
    I do not yet understand, what you want to achieve, but I suppose it would be possible. Please, explain better with larger screenshots.

    Comment

    • boris
      Junior Member
      • Apr 2019
      • 21

      #3
      Sorry for the small screenshot and the long explanation. I try again hopefully more understandable. I want to create a list like in the screenshot.
      A list of elements from another entity with an additional field for the amount. The field with the amount is the challenge...


      Comment

      • shalmaxb
        Senior Member
        • Mar 2015
        • 1655

        #4
        Ich schreibe mal auf deutsch, ist auch meine Muttersprache.
        Ich glaube, die Sales Extension ist nicht notwendig. Es ist sowieso nicht zu empfehlen, eine Extension für einen bestimmten Zweck (Sales: Abwicklung von Angebot über Auftrag zu Verkauf) zu verbiegen, das fällt einem immer irgendwann auf die Füße. Ich spreche aus Erfahrung.
        Ich würde das alles mit Custom Entities machen, mit Beziehungen und Formeln.
        Ich würde das mit einer Entity Wälder machen und einer Entity Setzlinge. Pflanzliste braucht man vielleicht gar nicht, die kann man dann über die Wälder erzeugen, wenn man will.
        Von Wald zu Setzlinge eine Beziehung 1:n für jede Baumsorte. Also bei vier Baumsorten vier Mal die gleiche Beziehung.
        Im Wald gibt es dann die jeweiligen Beziehungsfelder, wo man die Setzlinge auswählen kann. Die Anzahl kann man dort als Text oder Ganzzahl angeben, also etwa so:

        Wald 1
        alle Felder, die für den Wald notwendig sind
        Die Setzlinge Baumart 1 und die Anzahl
        Die Setzlinge Baumart 2 und die Anzahl
        ​​​​​​Die Setzlinge Baumart 3 und die Anzahl
        ​​​​​​​Die Setzlinge Baumart 4 und die Anzahl

        Man kann bei den Beziehungsfeldern der Setzlinge auch noch weitere Felder aus den Setzlingen per Formel übernehmen, z.B. eine Bestandsberechnung, die bei den Setzlingen stattfindet und hier angezeigt werden kann etc..
        Das Zähler-Feld darf aber nicht Number sein, weil das ein automatisch hochzählender Feldtyp ist.

        Wenn man die Pflanzlisten auch noch als Entity haben will, erstellt man diese und setzt sie auch zu den Wäldern in Beziehung, wodurch man in der Pflanzliste den Wald auswählt und dann die dort gepflanzten Setzlinge per Formel übernimmt. Aber vielleicht ist das auch gar nicht nötig, weil das ja schon beim Wald steht.

        Ich hoffe, dass meine Schlussfolgerungen zutreffen. So theoretisch ist das aber nicht ganz einfach.

        Comment

        Working...