cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Courtney
Level: Powered On

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
Dual Super User
Dual Super User

Re: Auto Fill Blank Text Input label

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.
Courtney
Level: Powered On

Re: Auto Fill Blank Text Input label

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?

Dual Super User
Dual Super User

Re: Auto Fill Blank Text Input label

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.
Courtney
Level: Powered On

Re: Auto Fill Blank Text Input label

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
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,180)