Forum Discussion
Related problem
So tabele ProjetoSegmento(2) is a duplicate of ProjetoSegmento because I need to create a column with all the dates between two sets of dates related to the beginning and end of a project. So I used Number.from[stardate]..Number.from[enddate] and created column [diasdeprojeto], since each project has several days I them had to expand the list and got a table with ProjetoSegmentoID repetead. and know I need to get the column [quant] in table ProjetoSegmento(2), using the relationship [id] in table projectoSegmento(2) (which is repeat) with [ProjectSegmentoId] in table ProjetoSegmentoOrcamento. Both tables are linked to ProjetosSegmento which has the primary informations.
Was I clear?
Hi inescosta,
Thanks for your detail description. If there is one to many relation table A(one) and table B(many), you only use related function in table B which have multiple values. If you used related in table A direction, it will return error. Because it doesn’t verify which one should be return.
>> So tabele ProjetoSegmento(2) is a duplicate of ProjetoSegmento because I need to create a column with all the dates between two sets of dates related to the beginning and end of a project. So I used Number.from[stardate]..Number.from[enddate] and created column [diasdeprojeto], since each project has several days I them had to expand the list and got a table with ProjetoSegmentoID repetead.
You should count the days in ‘ProjetoSegmentoOrcamento’ table for each ID. Then summarize it using appropriate function based on your requirement in ‘ProjetoSegmento(2)’ table. Finally, you can used related function in ‘ProjetoSegmento’ table to get the result.
If this is not what you want, please share the sample data and expected result for further analysis.
Best Regards,
Angelia