i have a app to do car reservations and i want to create a calendar view. i have this example the only thing wrong is that the cars need to be on the same row bu t i dont want to create a row every time i add a car or delete a row whe delete a car.
it is a gallery nested on other gallery.
The code to do the week days is setted on the onvisible of the screen and is like this:
Set( _DateSelected; Today() );;
Set( _FirstDayOfWeek; Switch( Weekday(_DateSelected); 7; DateAdd( _DateSelected; -6; TimeUnit.Days ); 6; DateAdd( _DateSelected; -5; TimeUnit.Days ); 5; DateAdd( _DateSelected; -4; TimeUnit.Days ); 4; DateAdd( _DateSelected; -3; TimeUnit.Days ); 3; DateAdd( _DateSelected; -2; TimeUnit.Days ); 2; DateAdd( _DateSelected; -1; TimeUnit.Days ); 1; DateAdd( _DateSelected; -0; TimeUnit.Days ); DateValue("01/01/2023") ) );;
the code of the outside gallery items is
[0;1;2;3;4;5;6]
the code to the inner gallery items is:
Filter( Reservas_Nao_Finalizado; estado = "Aprovado"; DateValue( Text( datainicio; DateTimeFormat.ShortDate ) ) <= DateValue( Text( DateAdd( _FirstDayOfWeek; ThisItem.Value; TimeUnit.Days ); DateTimeFormat.ShortDate ) ) && DateValue( Text( datafim; DateTimeFormat.ShortDate ) ) >= DateValue( Text( DateAdd( _FirstDayOfWeek; ThisItem.Value; TimeUnit.Days ) ) ) )
the code to the fill of th rectangle is:
If(IsBlank(ThisItem.Value);RGBA(0;0;0;0);ColorValue(LookUp(Tabela1; id = LookUp(Carros; carro = ThisItem.Value; id); cor)))
Auxiliar info
the translation of Aprovado is Aproved

Report
All responses (
Answers (