web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Sound Playing on scrol...
Power Apps
Unanswered

Sound Playing on scrolling, nit just on button press

(0) ShareShare
ReportReport
Posted on by 643

I have an app that is used to clock in. When you press the toggle button it patches a sharepoint site and playsa a sound. This works all fine, however when you press the screen to scroll or to filter it also plays the sound.

 

What option do i select to prevent this. The code for my sounds is:

 

On Toggle Change: Reset(Audio1);Set(Varmakesound, false);Set(Varmakesound, true)

On Audio Start: Varmakesound

 

Any help is appreciated as i have it set to Ho-Ho-Ho for christmas and it plays it 10 times in a row when your scrolling etc.

Categories:
I have the same question (0)
  • Matren Profile Picture
    454 Super User 2024 Season 1 on at

    Hi @jamescosten ,

     

    Instead of the OnChange property, why don't you try using the OnCheck and OnUncheck properties for the toggle button? OnCheck is actions to perform when the value of a checkbox or a toggle changes to true (i.e. toogle switched on). OnUncheck is actions to perform when the value of a checkbox or a toggle changes to false (i.e. toggle switched off).

     

    Thus for OnCheck you would use: Reset(Audio1);Set(Varmakesound, true)

    and OnUncheck you would use: Set(Varmakesound, false)

     

    Let me know how it goes.

     

    Best Wishes,

    Matren

     

    --------------------------------------------------------------------------------------------

    Find this post helpful, give it a Thumbs Up

    Solved your problem, click Accept as Solution so others can find it

  • jamescosten Profile Picture
    643 on at

    When i press the toggle, the sound crackles and stops halfway and only works intermitently. The toggle updates a sharepoint list, so i wonder if the sound is being interupted by the PATCH?

  • Matren Profile Picture
    454 Super User 2024 Season 1 on at

    Hi @jamescosten,

     

    If you only have two states for the toggle (on and off) I recommend first using the OnCheck and OnUncheck properties for the toggle as I listed above.

     

    Using a patch command on a toggle is a bit different, usually you would want to trigger it off of a "submit" button which, after successfully submitted, would play a sound. If you are wedded to the toggle button, the patch function would need to be on the OnCheck property.

     

    Can you share your patch code and where it is currently placed?

     

    Best Wishes,

    Matren

     

    --------------------------------------------------------------------------------------------

    Find this post helpful, give it a Thumbs Up

    Solved your problem, click Accept as Solution so others can find it

  • jamescosten Profile Picture
    643 on at

    Here is my setup:

     

    jamescosten_0-1669969057634.png

    I have the toggle embedded in the gallery, when toggled it updates the status on my SP List. Those coloured buttons laong the top are filters, but when i pressed the filters the toggles would reset, so i put the patch on the on select and added this to my gallery.

    jamescosten_1-1669969150869.png

    If its not possible with my current setup then i will simply remove the sound, but as its working on the toggle i'd like to understand the interaction with the gallery and filters and why the sound plays then.

     

  • Matren Profile Picture
    454 Super User 2024 Season 1 on at

    Hi @jamescosten ,

     

    I recommend you make the following changes:

     

    OnCheck: Reset(Audio1); Set(Varmakesound, true); Patch ( ... ) put your patch command in OnCheck

    OnUncheck: Set(Varmakesound, false)

    OnSelect: false

    OnChange: false

     

    Let me know how it goes.

     

    Best Wishes,

     

    Matren

     

    --------------------------------------------------------------------------------------------

    Find this post helpful, give it a Thumbs Up

    Solved your problem, click Accept as Solution so others can find it

     

  • Matren Profile Picture
    454 Super User 2024 Season 1 on at

    Hi @jamescosten ,

     

    I recommend you make the following changes:

     

    OnCheck: Reset(Audio1); Set(Varmakesound, true); Patch ( ... ) put your patch command in OnCheck

    OnUncheck: Set(Varmakesound, false)

    OnSelect: false

    OnChange: false

     

    Let me know how it goes.

     

    Best Wishes,

     

    Matren

     

    --------------------------------------------------------------------------------------------

    Find this post helpful, give it a Thumbs Up

    Solved your problem, click Accept as Solution so others can find it

  • jamescosten Profile Picture
    643 on at

    Same issue, still plays the sound when i select the filter buttons and touch the screen. Maybe its just designed that way?

  • Matren Profile Picture
    454 Super User 2024 Season 1 on at

    Hi @jamescosten

     

    I still think you should be able to meet your requirements. Let's investigate further before conceding.

     

    Are you selecting via a mouse or your finger? If you are physically touching the screen with your finger, can you try using the app with a mouse and see if the issue is still occuring?

     

    Also, can you share the code for how the app is playing a sound? Are you using a media player? If so, what code do you have for the following properties:

    Autostart, Loop, OnStart, OnEnd, OnPause, Reset?

     

    Let me know how it goes.

     

    Best Wishes,

     

    Matren

     

    --------------------------------------------------------------------------------------------

    Find this post helpful, give it a Thumbs Up

    Solved your problem, click Accept as Solution so others can find it

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 534

#2
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard