I have a custom form that grabs records from a second list. When the powerapp starts, I grab all of the records from this list, and put it in a collection (col_AllItems). When a user clicks on an item in the primary list, I try to filter the col_AllItems collection by the ID of the selected item and put the results in a new collection (col_ItemView). This was working fine until yesterday when I was troubleshooting a different issue with the form. Below is the code, let me know if I inadvertently screwed something up. I can't see that I did. I need a different set of eyes on this, any help is appreciated.
Let me preface this reply with a description of an additional issue with this form. Each item/request in the primary list has cooresponding item records in the secondary list. When you view a request, the cooresponding item records should display in a gallery at the bottom of the customized form. However, what's been happening when you click on a request is, the form displays, but the gallery does not:
I tried using a label, set it's Visible property to check if the variable wasn't empty. It was fine. I then set the Visible to check if the collection (col_ItemView) wasn't empty. The label was visible, implying it wasn't empty, yet it doesn't show when you initially click on a request. Now, if you click away/cancel the viewing of the form and click on the request again, it shows all of the items from the item list, not just the ones for the request you selected.
This is what was originally happening when I opened this discussion yesterday.
After reading your reply, I checked, and the ID and 'Request ID' were not the same type. 'Request ID' was Single line of text. I changed it to Number. After I refreshed, clicked on a request, the item list/gallery didn't show at all. I changed it back.
The 'Sales Item List' is not large at all, it only has 4 records.
The only troubleshooting/code changes that I made was to break out the selected ID. So instead of using var_selectedRecord.ID, I made a new variable called var_selectedRecordID and set it to SharePointIntegration.Selected.ID and put that in the ClearCollect line. When that proved unhelpful, I changed it back, and here we are.