I am creating a power app that uses the microsoft translate functionality and have some issues when testing it.
The 1st problem is that when the text input is blank i get a red error box saying it has failed and when I delete the text in the box I get a large error box.
(see attached image)
The 2nd is more of a question: "When the app 1st starts, is it normal for these red boxes to appear while everything connects or have i done something wrong as each time i start the app I get these screens for a few minutes.
Thanks in advance!
When calling this kind of data service I always make sure that the call is enclosed in an IF statement that checks whether the text box being used for input is empty or not. That way when the app starts up and the text box is empty the service won't be invoked. It will only be invoked later when you enter text into the text box.
Some property on one of the objects in Powerapps contains the statement MicrosoftTranslator.TextToSpeech() . That's the entry that needs to be enclosed in an If statement. Something like this:
If(Target.Text = "", ,MicrosoftTranslator.TextToSpeech(Target.Text, TargetLang.Selected.Value))
That way if the Target textbox is empty the call to the translator service won't be Invoked.
Where are you putting the call for TextToSpeech?
Here is a screenshot.
The dropdown control is preset to the required language and hidden.
The problem seems to be with the audio. I added the IF statement and still no joy. Strange thing it that when i text it on the desktop it works fine with out any error messages showing up.
We're excited to announce our first cross-community 'Can You Solve These?' challenge!
Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.
We are excited for the next Super User season.
FIll out a quick form to claim your community user group member badge today!
Features releasing from October 2020 through March 2021