Hello everyone,
I'm trying to figure out why I can't get reset on Object Detection to work, and why my Object detector control adds empty rows to the GroupedResults on screen navigation even if I do not provide a picture for analysis.
To begin with, my original issue is that whenever I go from the screen with the object detection control to the next screen (a simple screen with a gallery to show the output from the object detection control), it adds another record to the GroupedResults. This happens even if I do not take a photo or upload a picture using the object detection control. I have recreated the app twice and the behavior persists.
First screen
Second screen after clicking "Go to next screen" without using the control to detect a picture
Second screen after going back to the first screen and once again clicking "Go to next screen"
While the behavior above confuses me, for my purposes, my the end app design I have in mind would still work if I could clear the output from the model. It was suggested here https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Ability-to-clear-the-AI-Builder-Object-Detection-and-Card-Reader/idi-p/320674#M26990 that this is now possible. However, it does not work for me. Please see below.
Second screen showing a reset statement on the OnSelect propery of the backwards arrow control
Second screen after having left it (using the arrow) and coming back to it
(Regarding possible workarounds for my issue, my idea is basically to create a counting app, and if I cannot get the results in the gallery control for only those products that I had in my picture, my design does not work. I've looked at some tutorials and I believe other people might have solved this issue by using a First statement. However, this would not work for me as I need to scan a picture and retrieve counts for multiple products.)
Do any of you know why the reset does not seem to work? And why the control seems to add empty records to the GroupedResults even when no picture is provided for analysis?
Thank you for your help
Best regards,
John
Hi @JohnJohnB ,
Yes, I can reproduce your issue that the GourpedResult is not cleared when the ObjectDetector1 is reset, it could be a bug that worth investigate further.
However, If you want to get the output returned by ObjectDetector, please try to use ObjectDetector1.Results, which can be cleared properly when reset.
For more reference: object detector component properties
Hope this helps.
Sik