If and else functoids not working

Aug 19, 2009 at 7:24 AM

If-Then-Else functoid that is mentioned some places and not other places. It was acidentally excluded from the version 9 release.

Coordinator
Aug 19, 2009 at 6:05 PM

Hi

I am not sure what you want... if you cannot get the functoid to work, then please explain your setup and describe the error you are getting, if any?!?

Thanks.

--
eliasen

Aug 20, 2009 at 3:38 AM
Thanks for your reply.

I find what is happening...in if and else functoid you are calling date time function..that was a mistake..thats why it always give first input as output.

Thanks and Regards

Akshay Kumar

On Wed, Aug 19, 2009 at 11:35 PM, eliasen <notifications@codeplex.com> wrote:

From: eliasen

Hi

I am not sure what you want... if you cannot get the functoid to work, then please explain your setup and describe the error you are getting, if any?!?

Thanks.

--
eliasen

Read the full discussion online.

To add a post to this discussion, reply to this email (EEBizTalkFunctoids@discussions.codeplex.com)

To start a new discussion for this project, email EEBizTalkFunctoids@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Coordinator
Aug 22, 2009 at 9:52 PM

Hi

I have no idea what you are talking about. I am NOT calling any date time function in the if-then-else functoid as you write that I do...

Please explain the error you are getting and how to reproduce it. Otherwise I simply have no idea what your issue is..

--
eliasen

Feb 26, 2014 at 6:20 AM
Hi Eliasen

I'm trying to create a custom functoid that should take three parameters: Boolean input (logical), String1 and another String2.
On the basis of the boolean input, the functoid should return String1 if true else String2 if false

The issue that I'm facing is that String category functoid doesnt accept Logical input and vice versa
(Like you have stated in your blogs)

So I wrote the following code in my Custom Functoid:
public string LogicalIfThenElse(string Cond, string istrue, string isfalse)
    {
        if (Cond.ToLower() == "true")
            return istrue;
        else
            return isfalse;
    }
Now the issue is that the functoid always returns the first string even if I send the Condition as "false".

So could you let me know as to why this is happening and also if there is any other best way to solve my problem?

Something like overriding the inbuilt value mapping functoid so that it can take 3 parameters and return first or second string on basis of the first logical condition?

Hope I was able to explain my situation clearly...