Hi @vshah804 ,
Does the "TimeStamp" column in your two collections store the Text String value rather than date time value?
Based on the scenario that you mentioned, I guess the "TimeStamp" column in your two collections store the Text String value rather than date time value, is it right?
If you want to compare the "TimeStamp" column value in your two different collections, you need to use DateTimeValue() function to convert the "TimeStamp" string value into actual date time value, then you could compare the date time value in canvas app.
I have made a test on my side, please take a try with the following workaround:
Set the OnSelect property of a button to following:
ClearCollect(
CompareResult,
AddColumns(
LocalChanges,
"RecentTimestamp",
If(
DateTimeValue(LookUp(ReadTimeDatafromSource, ID = LocalChanges[@ID], Timestamp)) > DateTimeValue(LocalChanges[@Timestamp]),
DateTimeValue(LookUp(ReadTimeDatafromSource, ID = LocalChanges[@ID], Timestamp)),
DateTimeValue(LocalChanges[@Timestamp])
)
)
)
after you press above button to execute the ClearCollect function, the compare result would be saved into the CompareResult collection.
Within the CompareResult collection, there is a RecentTimestamp column, which is used to store the recent timestamp between your two collections for same ID value. You could add a Data Table in your app, set the Items property to following:
CompareResult
then enable corresponding columns in this Data Table, then recent timestamp value would show up for each ID.
Note: I assume that there is no duplicate ID in your individual LocalChanges collection and ReadTimeDatafromSource collection
Please consider take a try with above solution, check if the issue is solved.
Best regards,