Function IFF with AND & OR
Hi there I'm trying to make work a conditianal to change the user status base on some MV attributes using IFF conditions, but I think that I missing something in my syntax could you help me guys?? The scenario is this one: I have tree attributes to make my condition UserStatus, NeedsAPP and auxAPP The condition is as follow: If UserStatus and (NeedsAPP or auxAPP) have "active" then send "active" to status in the APP If UserStatus is "inactive" send "inactive" to the status in the APP. I did a IFF function as follow, but when I active the auxAPP it still send the inactive value to the APP. IIF(Eq(UserStatus,"active"),IIF(Eq(NeedsAPP,"active"),"A",IIF(Eq(auxAPP,"active"),"A","I")),"I") Cheers
January 21st, 2011 5:16pm

You have a logic error in your description that needs to be ironed out first. What should happen IF UserStatus is "active" and neither NeedsAPP nor auxAPP have "active"? Is this the same as UserStatus = Inactive? Is this your condition: If UserStatus and (NeedsAPP or auxAPP) have "active" then send "active" to status in the APP Else Send "inactive" to the status in the APP Cheers, MarkusMarkus Vilcinskas, Knowledge Engineer, Microsoft Corporation
Free Windows Admin Tool Kit Click here and download it now
January 21st, 2011 6:28pm

Yes the logic is right, but my syntax is not could you help me out Markus?
January 21st, 2011 6:43pm

Kichitan, to me, your syntax looks right - are you sure you have used the right test case? "...but when I active the auxAPP it still send the inactive value to the APP..." Yes, this is possible, if UserStatus was not "active"... Cheers, MarkusMarkus Vilcinskas, Knowledge Engineer, Microsoft Corporation
Free Windows Admin Tool Kit Click here and download it now
January 21st, 2011 8:47pm

Kichitan, to me, your syntax looks right - are you sure you have used the right test case? "...but when I active the auxAPP it still send the inactive value to the APP..." Yes, this is possible, if UserStatus was not "active"... Cheers, MarkusMarkus Vilcinskas, Knowledge Engineer, Microsoft Corporation
January 21st, 2011 8:47pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics