Reputation: 17
I have the below expression but want to add additional datasets into the existing expression for validation.
Existing expression:
=iif(isNothing(First(Fields!ordnum.Value, "FirstDataset")) = True, "No","Yes")
I would like to do something like the below in which if any data is present within any of the datasets, the result returns Yes, otherwise, No
=iif(isNothing(First(Fields!ordnum.Value, "FirstDataset"),(Fields!ordnum.Value, "SecondDataset"),(Fields!ordnum.Value, "ThirdDataset") ) = True, "No","Yes")
Something else I tried is but get the following error: The Value expression for the textrun ‘ordnum_1.Paragraphs[0].TextRuns[0]’ contains an error: [BC30516] Overload resolution failed because no accessible 'IIf' accepts this number of arguments.
=iif(isNothing(First(Fields!ordnum.Value, "FirstDataset")) = True, "No","Yes", iif(isNothing(First(Fields!ordnum.Value, "SecondDataset")) = True, "No","Yes"), iif(isNothing(First(Fields!ordnum.Value, "ThirdDataset")) = True, "No","Yes"))
Upvotes: 1
Views: 994
Reputation: 10880
You can use an OR in the IIF to check for any one of multiple conditions.
=IIF(ISNOTHING(First(Fields!ordnum.Value, "FirstDataset")) OR
ISNOTHING(First(Fields!ordnum.Value, "SecondDataset")) OR
ISNOTHING(First(Fields!ordnum.Value, "ThirdDataset")), "No","Yes")
Upvotes: 0