cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Puco
Frequent Visitor

How to set the control invisible when the Object Detector doesn't start to detect, not fail to detect.

Hi,

I want to make a reminder label visible only when the Object Detector fails to detect the object, and invisible when I just enter the detection screen (that means I don't upload photos yet, like the following situation)

 
1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @Puco ,

 

Could you tell me:

Do you want the label control not to be displayed when entering the detection screen?

Do you want to display the label control when detecting the object fails, rather than display the label control when detecting the object succeeds?

 

If my assumptions are correct , I suggest you set a variable .

 

1\ You could try to set the OnVisible property of the detection screen to :

Set(Thevar,0)

 

2\ Set the Onchange property of Object Detector control to:

Set(Thevar,Thevar+1)

 

3\ Set the visible property of the label control to:

If(Thevar=0,false,First( ObjectDetector1.GroupedResults.ObjectCount).ObjectCount=0 && Thevar<>0 ,true,false)

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

View solution in original post

2 REPLIES 2
v-xiaochen-msft
Community Support
Community Support

Hi @Puco ,

 

Could you tell me:

Do you want the label control not to be displayed when entering the detection screen?

Do you want to display the label control when detecting the object fails, rather than display the label control when detecting the object succeeds?

 

If my assumptions are correct , I suggest you set a variable .

 

1\ You could try to set the OnVisible property of the detection screen to :

Set(Thevar,0)

 

2\ Set the Onchange property of Object Detector control to:

Set(Thevar,Thevar+1)

 

3\ Set the visible property of the label control to:

If(Thevar=0,false,First( ObjectDetector1.GroupedResults.ObjectCount).ObjectCount=0 && Thevar<>0 ,true,false)

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

Hi, the method above is useful when first enter the screen, but if I change the drop-down list which changes the modelId of the object detector, the label control comes out. How can I control it?

Screen Shot 2021-02-09 at 5.50.03 PM.pngScreen Shot 2021-02-09 at 5.50.18 PM.png

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Users online (5,434)