Hello, PowerApps geniuses...
I am having an app crippling issue that appeared out of nowhere and I can't seem to solve it. I have a global variable that is used throughout this app (mainly in all of the components and gallery buttons) called varCurrentItem that assigns the current row number from a gallery and then adds it to a collection referencing a Table variable called varMasterPPE (this used to be a collection variable but for performance reasons I recently changed it to a table variable).
The app will work fine, with no issues then all of a sudden it will randomly flag ~ 3000 formulas with an "incompatible types for comparison error" centered around that varCurrentItem variable... which is set in this line of code (the on-select property of a button inside the gallery):
Set(varCurrentItem, ThisItem.RowNum);
ClearCollect(colCurrentItem, Filter(varMasterPPE, RowNum = varCurrentItem));
This is the code on the items property of the Gallery where the above code resides:
If(varUserInfoSearchTerm, Search(varUserInfoSearch, comAppAssignGallery.galAssignmentsSearchInput, "AdminName", "BranchInventory", "JobNumber", "UserInfoName", "RepairLocation", "RepairReason"),
If(!varMainEditOpen,
Switch(
varUserInfoFilterValue,
"Assign Date", Sort(varUserInfoSearch, DateValue(DateTime), Ascending),
"Branch", Sort(Filter(varUserInfoSearch, BranchInventory), Descending),
"HSE Admin", Sort(Filter(varUserInfoSearch, AdminName), Descending),
"Job Number", Sort(Filter(varUserInfoSearch, JobNumber), Descending),
"Name", Sort(Filter(varUserInfoSearch, UserInfoName), Descending),
"Repair", Sort(Filter(varUserInfoSearch, RepairStatus), Descending),
"Return Date", Sort(varUserInfoSearch, DateValue(RepairReturnDate), Ascending),
"HSE Admin", Filter(Sort(varUserInfoSearch, AdminName, Descending), AdminName),
"Supervisor", Filter(Sort(varUserInfoSearch, UserInfoManagerName, Ascending), UserInfoManagerName),
"Vendor", Sort(Filter(varUserInfoSearch, RepairLocation), Descending),
varUserInfoDefault),
LookUp(varMasterPPE, RowNum = varCurrentItem)
))
In the LookUp function it highlights the = sign and says "Incompatible type, can't compare number, error" which seems to indicate varCurrentItem is in error? but as you can see from the snip below, varMasterPPE has a number in the RowNum Column...

I have tried everything thinking the app is corrupted, backed up, downloaded and re-imported, reverted to earlier versions it will work for awhile and then for no reason spit out the errors again...
Hoping someone has some sort of insight for me??
Thanks in advance as always...