cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Want to show alert popup if field is empty on mashup.

Highlighted
Newbie

Want to show alert popup if field is empty on mashup.

Want to alert popup if field is empty on mashup when user click on navigation widget. Please help.

Tags (2)
8 REPLIES 8

Re: Want to show alert popup if field is empty on mashup.

Hi Rajanikant, could you please clarify which widget you are using for text entry?

Re: Want to show alert popup if field is empty on mashup.

Screen Shot 2017-07-13 at 4.27.50 PM.png

For text entry i am using Textbox and for navigation i am using Navigation Widget (Goto Locations).

Re: Want to show alert popup if field is empty on mashup.

Have you already checked the following two properties that are available for the Navigation Widget?

This will lead to something like this if Navigation widget doesn't receive the Mashup to navigate to

Re: Want to show alert popup if field is empty on mashup.

This Popup useful when we not setting MashupName on Navigation widget property..

But i want check if textbox field is empty then we have to show some text message "Please enter User name".

Re: Want to show alert popup if field is empty on mashup.

Sorry I don't follow so if it's not the clicking of Navigation Widget which other event is triggering the check on your mashup whether or not the text box is empty?

Re: Want to show alert popup if field is empty on mashup.

Hi Rajanikanth, You can use ToolTipField in the properties panel for displaying the text when hovering over a widget at run time.

(or) You can validate the entered text box value by creating a service and configure the service in the mashup builder. Please see the below simple example for your reference:

1) I have created a thing which has temperature property (I have set the default value to 0). I have written a service for displaying an error message if the temperature value is null or 0.

                    me.Temperature=Temperature;

                    if(me.Temperature == 0)

                    {

                         me.Message =  "Please Enter a value"

                    }

                    else{

                         me.Message =" "

                    }

2)Now, added this service and have done the property bindings accordingly with the widgets in the mashup builder. If we enter a value and click on SET button no error will be displayed. If we do not enter a value and click on the SET button an error message will be displayed as shown below:

I think this will be one of the ways to provide validations.

Re: Want to show alert popup if field is empty on mashup.

Hi Yamini,

It is working i tried this. But i want to check if textfield  is empty then Navigation widget should not navigate to next Mashup page.

# Currently i added MashupName as property for Navigation Widget and binded by service which return MashupName.

# But this will work if When Mashup is loaded.  After changing textfield this service not fired and Mashupname is not assigned to Navigation Widget.

Re: Want to show alert popup if field is empty on mashup.

The TextBox widget supports a property PlaceholderText. If you enter a value for that property (like 'Enter your first name'), when the widget appears and has not had any data entered, it will display 'Enter your first name'. Once something puts a value into the text box, the placeholder text will disappear. If you empty the text box later, it will re-appear.