#1 2016-09-19 17:52:28

Muhammad
Member
Registered: 2016-09-19
Posts: 5

How to get an Input's value length and other questions

I am trying to get InputBox value length

StrLen "[Input4.Value]" "foo"
Alert "Infor" "[foo]"

I am getting 'undefined'

Am I missing something.

Also I have check SendSMS function that is working fine but I don't know how to call "errorCallback" and "successCallback"

Offline

#2 2016-09-19 20:56:25

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: How to get an Input's value length and other questions

Hello Muhammad,

Thanks for your interest in my work at App Builder. Hope you find the program useful and therefore consider to purchase one or more program licenses.

About your first question, I can't reproduce the problem here, so be sure you doesn't not commit some "type" error or something like that. If you can prepare a little app which reproduce the problem I am happy to take a look.

About your second question, you no need to call to "errorCallback" nor "successCallback", they are called by the SendSMS plugin when success or if an error occur.

Offline

#3 2016-09-22 08:55:08

Muhammad
Member
Registered: 2016-09-19
Posts: 5

Re: How to get an Input's value length and other questions

Thank you for prompt reply. I have solved 1st problem. It was with number type input and confusing use of square brackets. You can hide a field with this code
Hide "[controlName]"
But you cannot focus with
Focus "[controlName]"
You have to omit square brackets

Now my question is in sendSMS plugin how to get errorCallback or SuccessCallback result and show in Alertbox

Thanks

Offline

#4 2016-09-22 08:56:14

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: How to get an Input's value length and other questions

Hello,

Muhammad wrote:

Now my question is in sendSMS plugin how to get errorCallback or SuccessCallback result and show in Alertbox

And what's the problem?

Offline

#5 2016-09-22 09:00:47

Muhammad
Member
Registered: 2016-09-19
Posts: 5

Re: How to get an Input's value length and other questions

There is no error. Messages are being sent perfectly but I want to show success or error message. I need example for SendSMS function

Offline

#6 2016-09-22 09:04:46

Muhammad
Member
Registered: 2016-09-19
Posts: 5

Re: How to get an Input's value length and other questions

For example if message sent successfully. It should show alert " sent successfully"

Offline

#7 2016-09-22 09:08:51

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: How to get an Input's value length and other questions

Hello,

Yes; I can note right now that the "Success" event is not fired even if the message is sent. Ok. I will take a look when have sometime. I don't know if the plugin suffer some modification in their API or something like that.

Offline

#8 2016-09-22 09:15:56

Muhammad
Member
Registered: 2016-09-19
Posts: 5

Re: How to get an Input's value length and other questions

Thank You
Can you please tell me how to store SendSMS function result in a variable and then use that variable in alert. Like in javascript we use
var a = prompt(xyz)

Then use a for whatever is retuned
How to do this in your action script. I am sorry this script is totally new for me, I am trying to understand it

Offline

#9 2016-09-22 09:34:28

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: How to get an Input's value length and other questions

Hello,

Please update your App Builder trial version: I modified a bit the SendSMS sample, which contains some mistake that prevent the Success event of the plugin to be fired. Now you can see the "Success" alert when the SMS is sent.

On the other hand, I think this not apply here, but, you can take a look at the "Return" app sample, which show us the usage of the "Return" action inside app's functions in order to get a possible function result.

P.S. Normally we use app's variables to do that, the Return action is only provided for some specific scenarios in which we want to use an app's function from Javascript code, for example.

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.