Take Date from another Table
I need to take a Date (FechaP1) in the ACTIVIDADES Table, from the DOCUMENTOS Table belonging to DISCIPLINAS.
The Orange Date, I try with these formula but take always the same dates
first((select DOCUMENTOS where Id = 887).FechaP1)
Or that but with error
first((select DOCUMENTOS where DISCIPLINAS.disciplina Id = 887).FechaP1)
Symbol expected ")" at line 1 column 56
9 replies
-
Is more complicate that I think because need the earliest date (FechaP1) for Fecha_Inicio and the latest date (FechaP5) for Fecha_Fin
-
I try this but nothing, for the Field Formula Fecha_Inicio
first(('1N_Documentos'.LT_Actividades.Actividad) where '1N_Documentos' FechaP1 =< 'Fecha Corte')
-
Luckily Ninox doesn't need Code is important to have programing experience to get into this. This Forum has helped me a lot If I didn't have anything.
-
Looking at an old DB, I see that Actividades has a 1:M relationship to Documentos, 1 record in Actividades has many related records in Documentos. So you don't need to do a select if you only want to get data from related records. For example if you wrote:
first(LF_Documentos.FechaP1)
It will return the data from FechaP1 of the very first record that is related to the record in Actividades.
But this only works if all related records in Documentos have the same FechaP1 date and I noticed that some don't. I don't know if that is just because this is sample data or this actually happens in your DB.
-
Fred
Right, not all documents have the same Dates each Documents has its own issue dates.
I don't change anything in relation database I have AVTIVIDADES 1 TO Many to DOCUMENTOS but the Formula don't work in the ACTIVIDADES Table.
But I can ACTIVIDADES M to M to DOCUMENTS
For example DISCIPLINAS Equipos (Equipments) have 3 Activities, General Equipos Activities, Especifications and Requisitions and each many Documents, but all documents is on Equipos.
The change I do is the RooUp the hours from Dompcuments to Activities to Disciplines to Project, and work good.
Anyway I send you the DB work
Thanks again.
-
I put the following in Fecha_Icicio in Actividades:
first('1N_Documentos'.FechaP1)
And it retrieves the correct date.
Content aside
- Status Answered
- 2 yrs agoLast active
- 9Replies
- 123Views
-
2
Following