Forum Discussion
Relation between two columns is not woking
Hi Anonymous ,
Thank you for responding to the question.
One opportunity can be tied to:
- Only one sales order.
- Multiple sales orders.
A sale order can be tied only to one opportunity, but multiple sales orders can be tied to that same opportunity. Thus, in my opinion, the appropiate relations between both variables should be one to many.
I have looked up for a bridge table, but I have not found any.
If you have any other suggestions, please let me know.
Best regards,
Sara.
Please confirm that there is a one-to-many relationship defined between crm_lead and sale_orders. To which table is the table of dates related? Because... you do have a proper Date table in the model, right?
Best
Darek
- saracaballero7 years agoFrequent Visitor
Hi Anonymous,
The relationhip between crm_lead and sale_order is one to many. For now, I am using the dates provided in the same table, that is, create_date, to filter sales orders. Later on, when I make sure that everything works, I will create a Date table.
If you want a sample of the data, please go to:
sale_order: https://drive.google.com/open?id=1_j_OTx3Bmq-0HVIecpwDFWScDBWsKZVK
cm_lead: https://drive.google.com/open?id=1ZROMqLmjw5mQN8Auf_VXPAug30__8XYr
Thank you,
Sara.
- Anonymous7 years agoNot applicableI will have a look but... your thinking is completely wrong. The very first thing to do when building a model is create a proper Date table. This is THE VERY FIRST thing to do, not the last one.
Best
Darek- saracaballero7 years agoFrequent Visitor
Hi Anonymous ,
Ok, thanks!
The thing is I want to create a calendar and connect all the dates that I am interested in filtering. However, for crm_lead, I want to columns of dates to be attached to the same Date table, which I think it is not possible. For this reason, I am waiting to see if this works to take the next step.
I am a Junior who just graduated, and this is the first time I am working with these types of programs, so I apologise if my procedure is not the correct one, because I am not an expert. Nevertheless, I am very willing to learn.Best regards,
Sara.