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.
Sorry, i'm still new to many of these terms.
What do you mean when you say "Calling" and where would I put the IF statement on the label entry?
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.
Check out the News & Announcements to learn more.
Did you know that you can visit the Power Query Forum in Power BI and now Power Apps
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
Check out our new Discover Your Career Path blog post series and get all the details.