i am trying to string together these IIF's.
i am gettng "Function missing ) " but i guess i cant see it.

myfunction(from)+iif(left(from,1)=".",""," iif(left(from,1)="",".","")â??)

Re: Stringing together IIF's by Viorel

Viorel
Mon Aug 08 09:50:11 CDT 2005


"Tom" <Tom@discussions.microsoft.com> wrote in message
news:8D4E8B8E-4A86-48B4-8083-7FD43161BDE7@microsoft.com...
>i am trying to string together these IIF's.
> i am gettng "Function missing ) " but i guess i cant see it.
>
> myfunction(from)+iif(left(from,1)=".",""," iif(left(from,1)="",".","")")
>
^
^
|
|
There are two places where seams to be messing a + sign or something else.
The following version will be working

myfunction(from)+iif(left(from,1)=".","",iif(left(from,1)="",".",""))

Viorel



Re: Stringing together IIF's by Fred

Fred
Mon Aug 08 10:16:39 CDT 2005

myfunction(from)+iif(left(from,1)=".",;
"",;
iif(left(from,1)="",;
".",;
""))


Just remove the two extra sets of quotation marks you had around your second
IIF.
--
Fred
Microsoft Visual FoxPro MVP


"Tom" <Tom@discussions.microsoft.com> wrote in message
news:8D4E8B8E-4A86-48B4-8083-7FD43161BDE7@microsoft.com...
>i am trying to string together these IIF's.
> i am gettng "Function missing ) " but i guess i cant see it.
>
> myfunction(from)+iif(left(from,1)=".",""," iif(left(from,1)="",".","")")
>



SV: Stringing together IIF's by Anders

Anders
Mon Aug 08 10:53:19 CDT 2005

The VFP9 version:
Myfuntion+ICASE(LEFT(from,1)='.',"",LEFT(from,1)="",".","")

-Anders


Den 05-08-08 16.38, i artikeln
8D4E8B8E-4A86-48B4-8083-7FD43161BDE7@microsoft.com, skrev "Tom"
<Tom@discussions.microsoft.com>:

> i am trying to string together these IIF's.
> i am gettng "Function missing ) " but i guess i cant see it.
>
> myfunction(from)+iif(left(from,1)=".",""," iif(left(from,1)="",".","")²)
>


Re: SV: Stringing together IIF's by Gene

Gene
Mon Aug 08 16:16:17 CDT 2005

On Mon, 08 Aug 2005 17:53:19 +0200, Anders <anders.altberg@telia.com>
wrote:

>The VFP9 version:
>Myfuntion+ICASE(LEFT(from,1)='.',"",LEFT(from,1)="",".","")

Which is also the Gene version from 2000. Nice to see that VFP
caught up. <breathes on hand><buffs hand against chest>

[snip]

Sincerely,

Gene Wirchenko


Re: Stringing together IIF's by Dan_Musicant

Dan_Musicant
Tue Aug 09 10:33:38 CDT 2005

On Mon, 8 Aug 2005 07:38:02 -0700, Tom <Tom@discussions.microsoft.com>
wrote:

:i am trying to string together these IIF's.
:i am gettng "Function missing ) " but i guess i cant see it.
:
:myfunction(from)+iif(left(from,1)=".",""," iif(left(from,1)="",".","")?)

I have found that stringing together and nesting IIF commands can get
convoluted and confusing leading to headaches (even in a guy like me,
who NEVER gets headaches.... um, except in complex scenarios like this).
The workaround is to go back to the more obvious and basic style of
nested IF / ELSE / ENDIF commands. The logic is more obvious when
inspecting the code and there's less room for missed syntax sometimes.

Dan

Re: Stringing together IIF's by Paul

Paul
Tue Aug 09 12:06:12 CDT 2005

MyFunction(from) + IIF(EMPTY(from), ".", "")


"Tom" <Tom@discussions.microsoft.com> wrote in message
news:8D4E8B8E-4A86-48B4-8083-7FD43161BDE7@microsoft.com...
>i am trying to string together these IIF's.
> i am gettng "Function missing ) " but i guess i cant see it.
>
> myfunction(from)+iif(left(from,1)=".",""," iif(left(from,1)="",".","")")
>



SV: Stringing together IIF's by Anders

Anders
Tue Aug 09 12:32:44 CDT 2005

Or you can get VFP9 and use ICASE().

Anders


Den 05-08-09 17.33, i artikeln isihf11gpttlme8q6lqr5j6qakpb3om24p@4ax.com,
skrev "Dan_Musicant" <man@privacy.net>:

> On Mon, 8 Aug 2005 07:38:02 -0700, Tom <Tom@discussions.microsoft.com>
> wrote:
>
> :i am trying to string together these IIF's.
> :i am gettng "Function missing ) " but i guess i cant see it.
> :
> :myfunction(from)+iif(left(from,1)=".",""," iif(left(from,1)="",".","")²)
>
> I have found that stringing together and nesting IIF commands can get
> convoluted and confusing leading to headaches (even in a guy like me,
> who NEVER gets headaches.... um, except in complex scenarios like this).
> The workaround is to go back to the more obvious and basic style of
> nested IF / ELSE / ENDIF commands. The logic is more obvious when
> inspecting the code and there's less room for missed syntax sometimes.
>
> Dan