cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Courtney
Helper V
Helper V

Auto Fill Blank Text Input label

Hi Everyone

 

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)

20190626_113927.png

 

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! 

4 REPLIES 4
Pstork1
Dual Super User III
Dual Super User III

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.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

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?

Pstork1
Dual Super User III
Dual Super User III

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? 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Here is a screenshot. 

 

The dropdown control is preset to the required language and hidden.

 

screen.png

 

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. 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,336)