10 Replies Latest reply on Jul 14, 2017 3:38 PM by brucehul RSS
    rhole Explorer

    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.

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

        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.
          ytella Apprentice

          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.
              rhole Explorer

              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.