Merging two if statements within an assign

I have two if in two different assign, if there a way to merge the two statements into one?

out_arrayCRNumber = If(jObjCompanyInfo.ContainsKey(“CRNNumber”), out_arrayCRNumber.Concat({jObjCompanyInfo(“CRONumber”).ToString}).ToArray, out_arrayCRNumber.Concat({String.Empty}).ToArray)

out_arrayCRNumber = If(jObjCompanyInfo.ContainsKey(“CRNNumber”), out_arrayCRNumber.Concat({jObjCompanyInfo(“CRNNumber”).ToString}).ToArray, out_arrayCRNumber.Concat({String.Empty}).ToArray)

Hi @duaine.b

You can try like this

If(YourCondition,Then,if(Condition,Then,Else))

or

If(YourCondition,if(Condition,Then,Else),Else)

Regards
Sudharsan

1 Like

@duaine.b

You can combine them…but I do not see any difference between both the statements

If(Condition1,True on COnidtion1,If(condition2,True on COndition2,False on Condition2 and 1))

cheers

Thanks for the above, i realised i made an error

1 Like

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