How to use switch case for an expression where we have to check the condition based on some null values

I need to check an expression for finding null values
In this case I need to see the columns in data table where if one column is empty then we have to check second column and print the value if it is there
And strictly we have to use the Switch case for this.

Hi @Kunal_Jain ,

Could you maybe explain your case with some examples ?
What would be the End Output in your case ?

My end result will be a date that will be fetched after checking the columns
EX:
D1 have no data than it will check in D2
If No Date is present in D2 then it will check in D3
And if find the value we have to print that

@Kunal_Jain , Here D1, D2, D3 are Datatables ?

No
Columns in the DataTable

the mandatory usage of a switch will drive the implementation to some less clear implementation. If absolutely needed then working with masks can help

But as mentioned, other implementation approaches will be more recommendable. As a compromise also have a look to the newly introduced else if

@Kunal_Jain ,

Could you Check the Sample Workflow Below, Not sure if this is the Expected output, but there is no usage of Switch required here.
CheckValue_In_DatatableColumns.xaml (10.1 KB)

The Output appears like below :
image

If the above doesn’t meet your Requirements, we would need more details as to the Working of the Process.

Well I already Implemented the code using IF Else
But the requirement was of Switch
But now I think it is not possible so we can keep the approach of If Else only

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