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.
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
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?
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
Here is my setup:
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.
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.
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
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
Same issue, still plays the sound when i select the filter buttons and touch the screen. Maybe its just designed that way?
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