Condition check issue


CAn some one help me with the condition error in if condition as I have used all the variable as string.

Thanks in advance!
Untitled|690x388

1 Like

Hi
Set the condition like this
Buddy
optDB2.ToString.Equals(optrptmonitoring.Tostring) AND
optrptmonitoring.ToString.Equals(optstoreptprint.ToString)

Cheers @shashank_dullu

1 Like

opt2.toEquals(optrmonitoring) and optrmonitoring.toequals(optrstoreprint)

ā€“
Mukesh

You need to provide boolean type variable there,

but if you give it as

a = b, it will work instead of a = b = c,because, a = b will return a boolean variable and if you want to check multiple here.,

you need to give it as

(a = b) and (b = c) , then it will work

its not working while running the code object reference error ?

its not working while running the code object reference error ? these variables are arguments in some other workflow which have been invoked in this workflow as in/out.

Before Comparison , Please Verify that optDB2 , optrptmonitoring and optrptmonitoring have values and are not Null.

so,

First we check if the variables we are comapring are not Null or Empty .
ā€“ If they are not null, then only compare ā€¦

Below is a Sample

image

ā€“
Mukesh

the variable optDB2 , optrptmonitoring and optrptmonitoring have values inside the invoked workflow but out side in the current workflow its not flowing.

So do you really want the value from Outside ?

If No - Then convert the Arguments to variable and Assign the values inside this flow and use those variables in condition.

If YES
Then take Three Variables say a,b,c

Check Condition - If the Three arguments are Not Null - Then only assign the arguments value to newly created variables.

If You have scenario like - That Take Value from both Outside and Inside.

Then - First check - If the outside one are not Null , If they are null assign the varibles values from inside one.

ā€“
Mukesh

Mukesh the value flowing from outside workflow to main work flow.and the arguments are coming to be blank.

Okay , If they are Blank , then how should this condition behave ?

You want to still shoot an Email saying the Values are blank ?

ā€“
Mukesh


this the second work from where I am getting the value of OPTDB2. and this optDB2 is an argument in the current workflow .and then this value flows in the main workflow.

image
optdb2 it has been invoked in the main workflow as variable .in which the value is not flowing. this value needs to be sent through email to others . and in a similar manner the other two workflows also generate the value and send to the main workflow . can you help with this Mukesh.

In the First WorkFlow , where you are assigning the Row count to OptDB2 , Use a writeline and Print the value to test wether it has the value to be passed to Main.

If the row count is printed properly - then we are good with this flow ā€¦ ALSO make sure that optDB2 is not getting overRiddedn.

In the Main Flow - After invoking the value in a variable - Print the value from main and see that the correct value is reflected.

ā€“
Mukesh

In the First workflow we are getting the value of OptBD2 . correctly but it is not getting transferred to main worklfow.

Cool , So the issue lies in the Main Flow.

  1. In the Main.xaml , take an Integer variable say intMainDB2.
  2. GO to the invoke workflow of DB2ShelfTagRequest ā€“ Import Arguements and Assign the newly created variable the value of outDB2.
  3. take a WriteLine and print the Value of New Variable , Confirm here the correct value is Printing or not.

ā€“
Mukesh

Thanks Mukesh it worked!!

Awesome ! Please mark the solution and close the Topic .

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.