Hello,
I was wondering if anyone had the same issue as me where launching a Power App on your phone prompts a notify message telling you to update after having previously pressed that notify message before already, as if It didnt do the update at all.
Also, does anyone know if the LoadData() / SaveData() phormulas are working properly as of today?
Im having some odd bugs with LoadData / SaveData on my application where on the OnStart property of the app. This is the logic where you can see I have a collection named "col_diaActual" which stores the current day in /dd/mm/yyyy format. when the app starts, it compares if the date is equal to Todays date. If it is, it loads some collections, otherwise it deletes the data.
It seems like sometimes, the file data is not deleted at all even though it clearly executes the instructions on the else part. That combined with the fact that the apps dont seem to update properly when you hit the Notify message makes debugging really confusing.
I'd appreciate someone to take the time to look into these issues and give me a clarification. Thanks!
Here is the code snippet of what I've mentioned earlier above:
If(!IsEmpty(col_diaActual) && First(col_diaActual).Value = Text(Today(); "[$-en-US]dd/mm/yyyy");
Notify("Hay datos de jornada en curso" ; NotificationType.Information);;
// Cargar texto del label de accion de jornada
// Cargar datos. Si no hay datos, es primera vez pulsandolo
LoadData(col_estadoActual; "datosGuardados");;
LoadData(col_numeroMovimientoEnCurso; "datosNumeroMovimientoEnCurso");;
// Cargar tiempo de Inicio al pulsar reanudar
LoadData(col_tiempoInicio; "datosTiempoInicio");;
// LoadData(col_tiempoDePausa; "datoTiempoDePausa");;
// Timer
LoadData(TimerValue ;"LocalTimerValue");;
Set(LogTime;Last(TimerValue).Value);;
// último registro hh:mm:ss. para intentar sacar el tiempo actual de trabajando
LoadData(col_lastRecord; "lastRecordValue");;
If(IsEmpty(col_estadoActual);
Notify("No tiene una jornada en curso" ; NotificationType.Information);
Notify("Tiene una jornada en curso. Pulse el día " & Today() & " en su calendario, y seleccione la opción 'Continuar Jornada' para actualizar o Finalizarla"; NotificationType.Warning)
);;
// Notify("Tiene una jornada en curso. Pulse en " & Today() & " y Continuar Jornada para actualizar o Finalizarla"; NotificationType.Information);;
// cambiar pantalla de inicio que no parece funcionar por limitaciones de PowerApps
Set(var_PantallaInicio; PantallaPausarDetenerJornada);;
Set(varbtnJornada; "Continuar Jornada")
;
Notify("No hay datos de jornada en curso" ; NotificationType.Information);;
Set(var_PantallaInicio; PantallaCalendario);;
Clear(col_estadoActual);;
// ClearCollect(col_estadoActual; Blank());;
Clear(col_numeroMovimientoEnCurso);;
Clear(col_tiempoInicio);;
ClearCollect(col_diaActual; Blank());;
// Clear(col_tiempoDePausa);;
// reiniciar valores de la pantalla de Jornada
Set(estadoJornadaTwo; "Pulse Iniciar Jornada para Comenzar");;
Set(varIniciarJornada; "Iniciar Jornada");;
Set(colorEstado; RGBA(227; 179; 34; 1));;
Set(varBackground; pause);;
Set(varPosicionImagen; ImagePosition.Center);;
Set(salioAlCalendar; false);;
Set(varbtnJornada; "Empezar Jornada");;
// reiniciar mensajes de pantalla Empezar Jornada
Set(mensajeEmpezarJornada; "Pulse el botón para comenzar su Jornada actual, o pulse 'Volver al calendario' para regresar");;
Set(estadoJornada; "Comenzar Jornada");;
Notify("Ha pasado por aquí" ; NotificationType.Information);;
);;