Why doesn't this work?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Why doesn't this work?

Mike Kerner via use-livecode
I’m concatenating one field & a passed phone number & another field.

The variable vNum works in the first if statement but is blank in the second. Why?

Thank you,
Bill Vlahos


on searchNow vNum
   if the hilite of button "Enable1" then
      put field "f1a" & vNum & field "f1b" into vQuery
      revGoURL vQuery
   end if
   if the hilite of button "Enable2" then
      put field "f2a" & vNum & field "f2b" into vQuery
      revGoURL vQuery
   end if
end searchNow
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Why doesn't this work?

Mike Kerner via use-livecode
It could be one of the fields has a space
at the end and the other does not.

JB


> On May 19, 2017, at 11:20 AM, Bill Vlahos via use-livecode <[hidden email]> wrote:
>
> I’m concatenating one field & a passed phone number & another field.
>
> The variable vNum works in the first if statement but is blank in the second. Why?
>
> Thank you,
> Bill Vlahos
>
>
> on searchNow vNum
>   if the hilite of button "Enable1" then
>      put field "f1a" & vNum & field "f1b" into vQuery
>      revGoURL vQuery
>   end if
>   if the hilite of button "Enable2" then
>      put field "f2a" & vNum & field "f2b" into vQuery
>      revGoURL vQuery
>   end if
> end searchNow
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Why doesn't this work?

Mike Kerner via use-livecode
JB,

It is the vNum variable itself that is empty in the if statement. If I put vNum the result is blank.

Thanks,
Bill

> On May 19, 2017, at 11:40 AM, JB via use-livecode <[hidden email]> wrote:
>
> It could be one of the fields has a space
> at the end and the other does not.
>
> JB
>
>
>> On May 19, 2017, at 11:20 AM, Bill Vlahos via use-livecode <[hidden email]> wrote:
>>
>> I’m concatenating one field & a passed phone number & another field.
>>
>> The variable vNum works in the first if statement but is blank in the second. Why?
>>
>> Thank you,
>> Bill Vlahos
>>
>>
>> on searchNow vNum
>>  if the hilite of button "Enable1" then
>>     put field "f1a" & vNum & field "f1b" into vQuery
>>     revGoURL vQuery
>>  end if
>>  if the hilite of button "Enable2" then
>>     put field "f2a" & vNum & field "f2b" into vQuery
>>     revGoURL vQuery
>>  end if
>> end searchNow
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Why doesn't this work?

Mike Kerner via use-livecode
Oh never mind. I was mistaken that it worked in the first “if statement”.

I needed to make vNum a global variable and now it works.

Bill

> On May 19, 2017, at 12:00 PM, Bill Vlahos via use-livecode <[hidden email]> wrote:
>
> JB,
>
> It is the vNum variable itself that is empty in the if statement. If I put vNum the result is blank.
>
> Thanks,
> Bill
>
>> On May 19, 2017, at 11:40 AM, JB via use-livecode <[hidden email]> wrote:
>>
>> It could be one of the fields has a space
>> at the end and the other does not.
>>
>> JB
>>
>>
>>> On May 19, 2017, at 11:20 AM, Bill Vlahos via use-livecode <[hidden email]> wrote:
>>>
>>> I’m concatenating one field & a passed phone number & another field.
>>>
>>> The variable vNum works in the first if statement but is blank in the second. Why?
>>>
>>> Thank you,
>>> Bill Vlahos
>>>
>>>
>>> on searchNow vNum
>>> if the hilite of button "Enable1" then
>>>    put field "f1a" & vNum & field "f1b" into vQuery
>>>    revGoURL vQuery
>>> end if
>>> if the hilite of button "Enable2" then
>>>    put field "f2a" & vNum & field "f2b" into vQuery
>>>    revGoURL vQuery
>>> end if
>>> end searchNow
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email]
>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode